Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

OGM-152 MongoDB remove persisting of Long as String not needed

  • Loading branch information...
commit 6385c929d31c96290214a515890776d434ade656 1 parent 1acb2a8
@ozoli authored
View
4 hibernate-ogm-mongodb/src/main/java/org/hibernate/ogm/dialect/mongodb/MongoDBDialect.java
@@ -39,7 +39,6 @@
import org.hibernate.ogm.logging.mongodb.impl.Log;
import org.hibernate.ogm.logging.mongodb.impl.LoggerFactory;
import org.hibernate.ogm.type.GridType;
-import org.hibernate.ogm.type.LongStringType;
import org.hibernate.ogm.type.StringCalendarDateType;
import org.hibernate.persister.entity.Lockable;
import org.hibernate.ogm.type.ByteStringType;
@@ -308,9 +307,6 @@ public GridType overrideType(Type type) {
else if ( type == StandardBasicTypes.BYTE ) {
return ByteStringType.INSTANCE;
}
- else if ( type == StandardBasicTypes.LONG ) {
- return LongStringType.INSTANCE;
- }
return null; // all other types handled as in hibernate-ogm-core
}
}
View
50 hibernate-ogm-mongodb/src/main/java/org/hibernate/ogm/type/LongStringType.java
@@ -1,50 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors
- * as indicated by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.hibernate.ogm.type;
-
-import org.hibernate.MappingException;
-import org.hibernate.engine.spi.Mapping;
-import org.hibernate.ogm.type.descriptor.StringMappedGridTypeDescriptor;
-import org.hibernate.type.descriptor.java.LongTypeDescriptor;
-
-
-/**
- * @author Oliver Carr ocarr@redhat.com
- */
-public class LongStringType extends AbstractGenericBasicType<Long> {
-
- public static final LongStringType INSTANCE = new LongStringType();
-
- public LongStringType() {
- super( StringMappedGridTypeDescriptor.INSTANCE, LongTypeDescriptor.INSTANCE );
- }
-
- @Override
- public String getName() {
- return "long";
- }
-
- @Override
- public int getColumnSpan(Mapping mapping) throws MappingException {
- return 1;
- }
-
-}
Please sign in to comment.
Something went wrong with that request. Please try again.