HHH-9736 : BigIntegerType should use BigIntTypeDescriptor

This commit is contained in:
Gail Badner 2015-04-28 16:01:36 -07:00
parent 829709f60e
commit 720202058c
8 changed files with 20 additions and 20 deletions

View File

@ -28,6 +28,7 @@ import java.sql.Types;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.descriptor.java.BigIntegerTypeDescriptor;
import org.hibernate.type.descriptor.sql.BigIntTypeDescriptor;
import org.hibernate.type.descriptor.sql.NumericTypeDescriptor;
/**
@ -43,7 +44,7 @@ public class BigIntegerType
public static final BigIntegerType INSTANCE = new BigIntegerType();
public BigIntegerType() {
super( NumericTypeDescriptor.INSTANCE, BigIntegerTypeDescriptor.INSTANCE );
super( BigIntTypeDescriptor.INSTANCE, BigIntegerTypeDescriptor.INSTANCE );
}
@Override

View File

@ -1,6 +1,7 @@
//$Id$
package org.hibernate.test.annotations.id.entities;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Set;
import javax.persistence.CascadeType;
@ -26,7 +27,7 @@ public class Bunny implements Serializable {
@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "java5_uuid")
@GenericGenerator(name = "java5_uuid", strategy = "org.hibernate.test.annotations.id.UUIDGenerator")
@Column(name = "id", precision = 128, scale = 0)
private BigInteger id;
private BigDecimal id;
@OneToMany(mappedBy = "bunny", cascade = { CascadeType.PERSIST })
Set<PointyTooth> teeth;
@ -38,7 +39,7 @@ public class Bunny implements Serializable {
this.teeth = teeth;
}
public BigInteger getId() {
public BigDecimal getId() {
return id;
}
}

View File

@ -1,7 +1,7 @@
//$Id$
package org.hibernate.test.annotations.id.entities;
import java.io.Serializable;
import java.math.BigInteger;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@ -26,7 +26,7 @@ public class PointyTooth implements Serializable {
@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "java5_uuid")
@GenericGenerator(name = "java5_uuid", strategy = "org.hibernate.test.annotations.id.UUIDGenerator")
@Column(name = "id", precision = 128, scale = 0)
private BigInteger id;
private BigDecimal id;
@ManyToOne
@JoinColumn(name = "bunny_id")
@ -36,7 +36,7 @@ public class PointyTooth implements Serializable {
this.bunny = bunny;
}
public BigInteger getId() {
public BigDecimal getId() {
return id;
}
}

View File

@ -1,6 +1,7 @@
//$Id$
package org.hibernate.test.annotations.id.entities;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -26,7 +27,7 @@ public class TwinkleToes implements Serializable {
@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "java5_uuid")
@GenericGenerator(name = "java5_uuid", strategy = "org.hibernate.test.annotations.id.UUIDGenerator")
@Column(name = "id", precision = 128, scale = 0)
private BigInteger id;
private BigDecimal id;
@ManyToOne
@JoinColumn(name = "bunny_id")
@ -36,7 +37,7 @@ public class TwinkleToes implements Serializable {
this.bunny = bunny;
}
public BigInteger getId() {
public BigDecimal getId() {
return id;
}
}

View File

@ -1,7 +1,7 @@
//$Id: Bunny.java 14761 2008-06-11 13:51:06Z hardy.ferentschik $
package org.hibernate.test.annotations.id.sequences.entities;
import java.io.Serializable;
import java.math.BigInteger;
import java.math.BigDecimal;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@ -26,7 +26,7 @@ public class Bunny implements Serializable {
@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "java5_uuid")
@GenericGenerator(name = "java5_uuid", strategy = "org.hibernate.test.annotations.id.UUIDGenerator")
@Column(name = "id", precision = 128, scale = 0)
private BigInteger id;
private BigDecimal id;
@OneToMany(mappedBy = "bunny", cascade = { CascadeType.PERSIST })
Set<PointyTooth> teeth;
@ -38,7 +38,7 @@ public class Bunny implements Serializable {
this.teeth = teeth;
}
public BigInteger getId() {
public BigDecimal getId() {
return id;
}
}

View File

@ -1,7 +1,7 @@
//$Id: PointyTooth.java 14761 2008-06-11 13:51:06Z hardy.ferentschik $
package org.hibernate.test.annotations.id.sequences.entities;
import java.io.Serializable;
import java.math.BigInteger;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@ -26,7 +26,7 @@ public class PointyTooth implements Serializable {
@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "java5_uuid")
@GenericGenerator(name = "java5_uuid", strategy = "org.hibernate.test.annotations.id.UUIDGenerator")
@Column(name = "id", precision = 128, scale = 0)
private BigInteger id;
private BigDecimal id;
@ManyToOne
@JoinColumn(name = "bunny_id")
@ -36,7 +36,7 @@ public class PointyTooth implements Serializable {
this.bunny = bunny;
}
public BigInteger getId() {
public BigDecimal getId() {
return id;
}
}

View File

@ -1,7 +1,7 @@
//$Id: TwinkleToes.java 14761 2008-06-11 13:51:06Z hardy.ferentschik $
package org.hibernate.test.annotations.id.sequences.entities;
import java.io.Serializable;
import java.math.BigInteger;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@ -26,7 +26,7 @@ public class TwinkleToes implements Serializable {
@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "java5_uuid")
@GenericGenerator(name = "java5_uuid", strategy = "org.hibernate.test.annotations.id.UUIDGenerator")
@Column(name = "id", precision = 128, scale = 0)
private BigInteger id;
private BigDecimal id;
@ManyToOne
@JoinColumn(name = "bunny_id")
@ -36,7 +36,7 @@ public class TwinkleToes implements Serializable {
this.bunny = bunny;
}
public BigInteger getId() {
public BigDecimal getId() {
return id;
}
}

View File

@ -26,10 +26,8 @@ package org.hibernate.test.idgen.biginteger.sequence;
import org.junit.Test;
import org.hibernate.Session;
import org.hibernate.dialect.SQLServer2012Dialect;
import org.hibernate.testing.DialectChecks;
import org.hibernate.testing.RequiresDialectFeature;
import org.hibernate.testing.SkipForDialect;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
/**
@ -42,7 +40,6 @@ public class BigIntegerSequenceGeneratorTest extends BaseCoreFunctionalTestCase
}
@Test
@SkipForDialect( SQLServer2012Dialect.class )
public void testBasics() {
Session s = openSession();
s.beginTransaction();