[hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-460) LazyInitializationException while removing entity with @ContainedIn annotation
Maciej Szulik (JIRA)
noreply at atlassian.com
Tue Feb 16 06:24:47 EST 2010
LazyInitializationException while removing entity with @ContainedIn annotation
------------------------------------------------------------------------------
Key: HSEARCH-460
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-460
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.1.1.GA
Reporter: Maciej Szulik
Priority: Blocker
Attachments: hibsearch.zip, Lazy.stack
I attach a Jboss Seam 2.2.0.GA project (without lib directory - one should take it entirely from seam default application generated using seam gen), as a complete illustration of the problem.
The Problem itself:
I have 2 entities:
Color (Long id, String name, Set<Vehicle> vehicles)
and Vehicle (Long id, String name, Color color).
Vehicle is indexed entity (@Indexed), while color has @ContainedIn on Set<Vehicle>.
Problem arises while managing color objects, strictly speaking while removing colors, LazyInitalizationException is thrown (stack trace is in attachment).
Every other operation on color entity (inserting, updating) works like a charm.
In attached example I created with a simple page for managing colors. It presents a list of already defined color objects in DB. If non present, you should generate some with 'Add random color'. To obtain above error click on 'Remove' link next to one of the colors presented on list.
--
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list