[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5233?page=c...
]
Tobias Zafke commented on HHH-5233:
-----------------------------------
Hi, is this really fixed in Core 1.6.x? I tried 1.6.0 - 1.6.8 and seem to have exactly
this problem.
* If I define the fetchProfile with 2 @FetchOverrides, only the
"affectedComponent"-Association will be loaded (No matter how the
@FetchOverrides are ordered).
* If I remove the FetchOverride for "affectedComponents", then
"mailOptions" will be loaded as expected.
* If I do not enable the Profile both Associations will not be loaded as expected.
{code:title=Profile-Definition|borderStyle=solid}
@FetchProfiles({
@FetchProfile(name="eager-component", fetchOverrides = {
@FetchProfile.FetchOverride(entity = Component.class, association =
"affectedComponents", mode = FetchMode.JOIN),
@FetchProfile.FetchOverride(entity = Component.class, association =
"mailOptions", mode = FetchMode.JOIN)
})
})
{code}
{code:title=Mapping-Definition|borderStyle=solid}
@OneToMany(mappedBy="component", cascade=CascadeType.ALL, fetch=FetchType.LAZY,
orphanRemoval=true)
private Set<MailOption> mailOptions = new HashSet<MailOption>();
@OneToMany(mappedBy="parentComponent", cascade=CascadeType.ALL,
fetch=FetchType.LAZY, orphanRemoval=true)
private Set<AffectedComponent> affectedComponents = new
HashSet<AffectedComponent>();
{code}
There also is an current issue in User-Forum for this topic:
https://forum.hibernate.org/viewtopic.php?f=1&t=1013200&p=2449883....
Can you help here?
@FetchProfile fails to take more than one
@FetchProfile.FetchOverride
---------------------------------------------------------------------
Key: HHH-5233
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5233
Project: Hibernate Core
Issue Type: Bug
Components: annotations
Affects Versions: 3.5.2
Reporter: Emmanuel Bernard
Assignee: Hardy Ferentschik
Fix For: 3.6.0.Beta1
A unit test is committed in
org.hibernate.test.annotations.fetchprofile.MoreFetchProfileTest#testFetchWithTwoOverrides
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira