]
Grégoire Rolland updated HSEARCH-386:
-------------------------------------
Attachment: hsearch_jira.zip
This is the test case for the 3/.
In a Transaction, Delete on unindexed entities referenced by indexed
entities with ContainedIn throw LazyInitializationException
--------------------------------------------------------------------------------------------------------------------------------
Key: HSEARCH-386
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-386
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.1.0.GA, 3.1.1.GA
Environment: Hibernate 3.3.1.GA, PostgreSQL 8.3
Reporter: Grégoire Rolland
Priority: Critical
Attachments: hsearch.tar.gz, hsearch_jira.zip
Delete on unindexed entities referenced by indexed entities with ContainedIn annotation
failed.
On PostCommit Transaction, I get a LazyInitializationException on the collection with the
ContainedIn annotation.
I upload a test case to reproduce this, run the Boot class.
1/ Entity2 is not lacking @DocumentId, I read the doc again and again (my english is very
poor, but ...) : "In fact since the 3.1.0 release of Hibernate Search @DocumentId is
optional in the case where an @Id annotation exists."
2/ Entity2 is not lacking @IndexedEmbedded, see the "entity1" association.
3/ From Hibernate Entity Manager Doc : "In an EXTENDED persistence context, all read
only operations of the entity manager can be executed outside a transaction (find(),
getReference(), refresh(), and read queries). Some modifications operations can be
executed outside a transaction, but they are queued until the persistence context join a
transaction. This is the case of persist(), merge(), remove(). Some operations cannot be
called outside a transaction: flush(), lock(), and update/delete queries.". This is
the case of the attached test. I attach a second testcase with all the operation in a
transaction, the result is the same.
4/ I check 3.1.1-GA, the problem occurs alway.
5/ All the operation are in a transaction.
Please read and run my testcase and if I missuse hibernate say me where.
I can't reopen the bug HSEARCH-342, I open a new bug because the resolution of the
bug HSEARCH-178 don't resolve this problem.
Thank you.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: