ORM tries to create a unique constraint on a non existing table

Description

Hi,

Given the following mapping for the parent table (the fact that it is a @Entity, not a @MappedSuperclass is important):

with the following child table:

Hibernate logs the following error when starting the context (and the context is successfully started anyway):

This mapping was OK with Hibernate < 5 and Hibernate should not try to create a contraint for this table.

I will push a test case using the Hibernate templates in a followup comment.

Activity

Show:

Andrea Boriero February 26, 2016 at 5:32 PM


you are welcome!

Guillaume Smet February 26, 2016 at 4:05 PM

Thanks Andrea!

Former user February 25, 2016 at 3:55 AM

I've confirmed that the unique constraint on the subclass is created properly in 5.0.8.

Hibernate does not try to create the unique constraint in 4.2.

Guillaume Smet February 24, 2016 at 11:13 AM

Hi ,

I confirm it's a problem with 5.0.8 as well. You can reproduce it very easily with the above test case.

Former user February 23, 2016 at 8:16 PM

, is this a problem in 5.0.8 as well?

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Created February 22, 2016 at 1:10 PM
Updated March 24, 2016 at 12:34 PM
Resolved February 26, 2016 at 12:41 PM