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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to