[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-603?page=co...
]
Stefan Djurasic commented on ANN-603:
-------------------------------------
i have the same issue and your hint doesn't work by me either.
Have a Item which can have several medias. Medias FetchType is Eager. If an Item has more
Medias, the Item will be more then once in the List when calling findByCriteria()
I don't think this should be possible and therefore i don't think either this
should be expected ;-)
Anyway i also changed to FetchMOde.SELECT and now it works fine. Hope it will be fixed in
next version.... currently i'm using hibernate-3.2.5ga with annotations 3.3.1ga
Cheers
Stefan
Using @CollectionOfEelements with FetchMode.JOIN and FetchType.EAGER
to map a Map breaks Example criteria
---------------------------------------------------------------------------------------------------------
Key: ANN-603
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-603
Project: Hibernate Annotations
Issue Type: Bug
Components: binder
Affects Versions: 3.3.0.ga
Environment: hibernate-core-3.2.2.jar
Reporter: Philippe Laflamme
Attachments: ann-example_eager_join.patch
I'm using CollectionOfElements to map a Map<String, @Embeddable>. I want it to
eagerly join the associated table to fill the map.
When I load the Entity using its PK, I obtain a single object with multiple entries in
the Map, which is the expected behaviour. If I load the same Entity using an Example
criteria (matching one of its property), I get one Entity per entry in the Map.
If you use FetchMode.SELECT, the resulting Example query returns a single entity with
multiple values in the Map (expected behaviour).
Attached is a patch against annotations_3_3_0_GA that creates a test case in
CollectionElementTest that reproduces the problem.
--
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