Chris L created Bug HHH-8034
Issue Type: Bug Bug
Affects Versions: 4.1.0, 3.6.10, 3.5.5
Assignee: Unassigned
Attachments: NestedEmbeddable.rar
Components: annotations, core, metamodel
Created: 25/Feb/13 11:23 AM
Description:

I want to have an object model with four classes, two entities (A and B) and two embeddeables (X and Y). A has a list of X, which contains a Y, which refers to a B.

If I set up a Configuration with these classes, and use SchemaExport to produce SQL for it, I expect to get tables for A and B, and a collection table that links the two with any information that X and Y have. Instead, the collection table just has A.

I can workaround by collapsing X and Y, so there's no Embeddable nesting, but I feel like this should work. Indeed, I tried it in another JPA implementation (EclipseLink) and it does work.

I've attached the four classes along with a runnable test case that just runs the described SchemaExport.

Environment: Any database, Hibernate4 or 3.
Project: Hibernate ORM
Labels: hibernate jpa2 schema embedded collection
Priority: Major Major
Reporter: Chris L
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira