[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5732?page=c...
]
benoit heinrich commented on HHH-5732:
--------------------------------------
Hi,
I'm having exactly the same problem and I'm wondering if there is a way to either
fix my mapping, or find a workaround until this is fixed.
{code}
@Entity
@Table
public class PersonDetail {
@OneToMany(mappedBy = "personDetail", cascade = CascadeType.ALL, orphanRemoval
= true, fetch = FetchType.LAZY)
@OrderColumn(name = "position", columnDefinition = "tinyint",
nullable = false)
private List<PersonContactDetail> contactDetailList;
}
@Entity
@Table
public class PersonContactDetail {
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(columnDefinition = "int", name = "person_detail_id",
nullable = false)
private PersonDetail personDetail;
}
{code}
Any help would be more than useful ;)
Cheers,
/Benoit
@OrderColumn not updated if @OneToMany has mappedby defined
-----------------------------------------------------------
Key: HHH-5732
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5732
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.6.0
Reporter: Jaroslaw Lewandowski
Fix For: 3.6.2, 4.0.0.Alpha1
Attachments: Screen shot 2011-01-10 at 21.41.27.png, TestOrderColumn.zip
As I'm not able to reopen HHH-5378 I'm creating a new one. There is nothing said
in JPA2.0 documentation that with @OrderColumn are any limitations regarding of usage
mappedBy attribute on @OneToMany annotation. As I mentioned in the comments of that issue
- even Hibernate documentation
http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/collections...
uses example which fails when executed with 3.6.0.Final version.
Test case attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira