Hibernate version: 3.2 cr2
Mapping documents: NA
Code between sessionFactory.openSession() and session.close(): NA
Full stack trace of any exception that occurs: it's actually the excption that's wrong
Name and version of the database you are using: NA
The generated SQL (show_sql=true): NA
Debug level Hibernate log excerpt: NA
Hello,
I'm very sorry for this informal post, I'm not sure where to submit a bug report.
http://anonhibernate.labs.jboss.com/tru ... nKeys.java line 217
As you can see, I'm referring to the subversion trunk (subversion r9995 is the version i'm looking at now).
version 3.2 cr2, May 5, 2006 was what I found in the readme.txt
This is most certainly a bug although it's a VERY low priority bug. The conditional (?:) operator has a lower precedence than the additive (+) operator. This means you meant to put parentheses around the ?: operation.
I found information on operator precedence here:
http://java.sun.com/docs/books/tutorial ... sions.html
here is the patch:
Code:
--- ForeignKeys.java.orig 2006-06-06 17:15:34.992966000 -0400
+++ ForeignKeys.java 2006-06-06 17:21:31.565692700 -0400
@@ -215,7 +215,7 @@
if ( isTransient(entityName, object, Boolean.FALSE, session) ) {
throw new TransientObjectException(
"object references an unsaved transient instance - save
the transient instance before flushing: " +
- entityName == null ? session.guessEntityName( object )
: entityName
+ ( entityName == null ? session.guessEntityName( object
) : entityName )
);
}
id = session.getEntityPersister(entityName, object)
(In case the formatting isn't working on this patch, all I added was parentheses around the ?: line).
Thank you for your time and I am again sorry that I couldn't find where to submit a bug report.
adrian