[Hibernate-JIRA] Commented: (HHH-1716) Orphaned identities
by James Carman (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1716?page=c... ]
James Carman commented on HHH-1716:
-----------------------------------
For what it's worth, we decided to go with UUIDs for our ids to solve this (and other) problems. However, it helps performance if you use a version field (with an appropriate unsaved value) along with your UUID-based entity so that hibernate knows when an object is new (it needs to save) vs. existing (needs to update).
> Orphaned identities
> -------------------
>
> Key: HHH-1716
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1716
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Reporter: James Carman
>
> When saving an object, its identity is set (for generated identities of course), even if the transaction is rolled back. This can cause some nasty problems in webapps when using an entity object to store data entered by the user on a form (and displaying back the data if there are errors). Hibernate will think this object is persistent even though it's not when using saveOrUpdate(). Is there a way that the identity values can be set back to what they were originally (nulled out) or can you not set the identity values until transaction completion? Here's some code:
> final Foo foo = new Foo();
> foo.setName( "Hello, Foo!" );
> final SessionFactory sf = getSessionFactory();
> Session session = sf.openSession();
> Transaction tx = session.beginTransaction();
> session.save( foo );
> tx.rollback();
> session.close();
> session = sf.openSession();
> tx = session.beginTransaction();
> session.saveOrUpdate( foo );
> tx.commit(); // Exception here!
> session.close();
> sf.close();
--
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
17 years, 8 months
[Hibernate-JIRA] Commented: (HHH-1716) Orphaned identities
by Hasan Turksoy (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1716?page=c... ]
Hasan Turksoy commented on HHH-1716:
------------------------------------
As stated some related forum posts about this issue, "merge" is not setting identifier field in case of rollback operation. I've written about this type of solution at here(http://www.jroller.com/comments/hasant/Weblog/hibernate_saveorupdate....
But, my project is a huge one. We've used saveOrUpdate method to save/update our entities till now. So, our all mappings and cascades are written according to this structure. From this point, it's very difficult to arrange and test cascades for using with the "merge" method.
So; saveOrUpdate method should have this fix urgently.
> Orphaned identities
> -------------------
>
> Key: HHH-1716
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1716
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Reporter: James Carman
>
> When saving an object, its identity is set (for generated identities of course), even if the transaction is rolled back. This can cause some nasty problems in webapps when using an entity object to store data entered by the user on a form (and displaying back the data if there are errors). Hibernate will think this object is persistent even though it's not when using saveOrUpdate(). Is there a way that the identity values can be set back to what they were originally (nulled out) or can you not set the identity values until transaction completion? Here's some code:
> final Foo foo = new Foo();
> foo.setName( "Hello, Foo!" );
> final SessionFactory sf = getSessionFactory();
> Session session = sf.openSession();
> Transaction tx = session.beginTransaction();
> session.save( foo );
> tx.rollback();
> session.close();
> session = sf.openSession();
> tx = session.beginTransaction();
> session.saveOrUpdate( foo );
> tx.commit(); // Exception here!
> session.close();
> sf.close();
--
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
17 years, 8 months
[Hibernate-JIRA] Created: (HSEARCH-214) Should upgrade Lucene to 2.3.2
by Sanne Grinovero (JIRA)
Should upgrade Lucene to 2.3.2
------------------------------
Key: HSEARCH-214
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-214
Project: Hibernate Search
Issue Type: Task
Reporter: Sanne Grinovero
Priority: Minor
Fix For: 3.1.0
from Lucene's changelog:
======================= Release 2.3.2 2008-05-05 =======================
Bug fixes
1. LUCENE-1191: On hitting OutOfMemoryError in any index-modifying
methods in IndexWriter, do not commit any further changes to the
index to prevent risk of possible corruption. (Mike McCandless)
2. LUCENE-1197: Fixed issue whereby IndexWriter would flush by RAM
too early when TermVectors were in use. (Mike McCandless)
3. LUCENE-1198: Don't corrupt index if an exception happens inside
DocumentsWriter.init (Mike McCandless)
4. LUCENE-1199: Added defensive check for null indexReader before
calling close in IndexModifier.close() (Mike McCandless)
5. LUCENE-1200: Fix rare deadlock case in addIndexes* when
ConcurrentMergeScheduler is in use (Mike McCandless)
6. LUCENE-1208: Fix deadlock case on hitting an exception while
processing a document that had triggered a flush (Mike McCandless)
7. LUCENE-1210: Fix deadlock case on hitting an exception while
starting a merge when using ConcurrentMergeScheduler (Mike McCandless)
8. LUCENE-1222: Fix IndexWriter.doAfterFlush to always be called on
flush (Mark Ferguson via Mike McCandless)
9. LUCENE-1226: Fixed IndexWriter.addIndexes(IndexReader[]) to commit
successfully created compound files. (Michael Busch)
10. LUCENE-1150: Re-expose StandardTokenizer's constants publicly;
this was accidentally lost with LUCENE-966. (Nicolas Lalevée via
Mike McCandless)
11. LUCENE-1262: Fixed bug in BufferedIndexReader.refill whereby on
hitting an exception in readInternal, the buffer is incorrectly
filled with stale bytes such that subsequent calls to readByte()
return incorrect results. (Trejkaz via Mike McCandless)
12. LUCENE-1270: Fixed intermittant case where IndexWriter.close()
would hang after IndexWriter.addIndexesNoOptimize had been
called. (Stu Hood via Mike McCandless)
Build
1. LUCENE-1230: Include *pom.xml* in source release files. (Michael Busch)
--
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
17 years, 8 months
[Hibernate-JIRA] Created: (HSEARCH-154) Provide a facility to access Lucene query explanations
by Nick Vincent (JIRA)
Provide a facility to access Lucene query explanations
------------------------------------------------------
Key: HSEARCH-154
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-154
Project: Hibernate Search
Issue Type: New Feature
Components: query
Affects Versions: 3.0.0.GA
Environment: Hibernate 3.2
Reporter: Nick Vincent
Priority: Minor
Attachments: explainpatch.txt
Hibernate search should provide a facility where it is possible access the Lucene explanation for a Hit object. I've attached a patch that allows it to do this.
I've implemented this only at the FullTextQueryImpl level such that it does not appear in the public API as it seems rather Lucene specific to include in the FullTextQuery interface.
Using this patch it is possible to access the explanation for a document by casting FullTextQuery to its implementation class.
It is also necessary to be able to discover the internal Lucene document id for a document in order to be able to request an Explanation object. I've added this to the projection constants and modified DocumentExtractor to utilise it.
--
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
17 years, 8 months
[Hibernate-JIRA] Updated: (HHH-1697) OracleDialect fails to recognize sequence accessible through syonyms when validating schema
by Diego Plentz (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1697?page=c... ]
Diego Plentz updated HHH-1697:
------------------------------
Fix Version/s: (was: 3.4)
3.3.0.CR2
> OracleDialect fails to recognize sequence accessible through syonyms when validating schema
> -------------------------------------------------------------------------------------------
>
> Key: HHH-1697
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1697
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.3.0.CR1
> Environment: Hibernate 3.1.2, Hibernate 3.1.3 Oracle 10g
> Reporter: Bjørn Bjerkeli
> Assignee: Diego Plentz
> Priority: Minor
> Fix For: 3.3.0.CR2
>
> Attachments: Oracle9Dialect.java
>
>
> The Dialect implementations in OracleDialect and Oracle9Dialect fails to recognize sequences upon validation when they are accesssed through synonyms
> because the user_sequences table will not create when the sequence is acced through a synonym. This is needed when using hibernate.hbm2ddl.auto=validate
> which is a very useful feature.
> Thus sequences returned by:
> public String getQuerySequencesString() {
> return "select sequence_name from user_sequences";
> }
> will mot identify sequences accessible using a synonym.
> By using this implementation:
> public String getQuerySequencesString() {
> return "select sequence_name from user_sequences " +
> "union " +
> "select synonym_name from user_synonyms us " +
> "where exists (select 1 from all_objects ao where object_type='SEQUENCE' and " +
> "us.table_name = ao.object_name)";
> }
> orale will also return sequences acccessible though synonyms.
--
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
17 years, 9 months