[hibernate-dev] org.hibernate.test.annotations.manytoone.referencedcolumnname.ManyToOneReferencedColumnNameTest
Gail Badner
gbadner at redhat.com
Wed Jul 22 01:17:10 EDT 2015
BTW, I was not able to reproduce this by running the test repeatedly in Intellij. I saw the differences when comparing SQL/DDL from running the hibernate-core unit tests multiple times.
----- Original Message -----
> From: "Gail Badner" <gbadner at redhat.com>
> To: "Hibernate Dev" <hibernate-dev at lists.jboss.org>
> Sent: Tuesday, July 21, 2015 10:08:28 PM
> Subject: [hibernate-dev]
> org.hibernate.test.annotations.manytoone.referencedcolumnname.ManyToOneReferencedColumnNameTest
>
> I think this is probably just a bug in the test, but I want to mention it in
> case there is a real bug here.
>
> When I run the unit tests multiple times, sometimes I see WarehouseItem
> created with:
>
> create table WarehouseItem (
> id integer generated by default as identity,
> version integer not null,
> qtyInStock decimal(19,2),
> vendor_id integer,
> item_id integer,
> primary key (id)
> )
>
> Sometimes WarehouseItem is created with:
> create table WarehouseItem (
> id integer generated by default as identity,
> version integer not null,
> qtyInStock decimal(19,2),
> ITEM_ID integer not null,
> VENDOR_ID integer not null,
> primary key (id)
> )
>
> I started seeing this only recently (last couple of weeks or so).
>
> In the WarehouseItem class [1], the following join column names are
> specified: vendor_id, VENDOR_ID, item_id, ITEM_ID.
>
> I'm sure that making the column names consistent (upper or lower) case would
> make the table DDL consistent. I want to make sure I don't mask a real bug
> by making this change.
>
> Is this a bug in the test, or a bug in how column names are processed?
>
> [1]
> https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/test/annotations/manytoone/referencedcolumnname/WarehouseItem.java
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
More information about the hibernate-dev
mailing list