Issue Type: Bug Bug
Affects Versions: 4.1.5.SP1
Assignee: Unassigned
Attachments: hibernate-fetch-eager-composite-key-test.zip
Created: 06/Aug/12 10:36 AM
Description:

Child entity has the follwoing key:

@Id
private Long id;

@Id
@ManyToOne
@JoinColumn(name = "parent_id")
private Parent parent;

When I'm trying to fetch parent with children I get StackOverflowException (on H2) or "to0 many cursors" SQLException (on Oracle).

If hibernate.show_sql is turned on - one and the same query is written to stdout multiple times.

Full example is in the attachment or on github: https://github.com/isopov/hibernate-fetch-eager-composite-key-test

I will appreciate any comments regarding workarounds or bad practices that are used in this example (I'm a newcomer to Hibernate)

Environment: h2 - 1.2.145
Oracle 11g
Project: Hibernate ORM
Priority: Major Major
Reporter: Ivan Sopov
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