RE: Hibernate 3.0

James <[email protected]> Thu, 7 Jul 2005 13:25:18 -0700 (PDT)
Newsgroups gmane.comp.db.mckoi
Message-ID <[email protected]>
After thinking about this more, as I should have, I
see that Spring is not in the equation.

I finally decided to install version 3 of Hibernate
and see what's up.

I see the exception that you see.  

In hibernate.properties I tried setting isolation to
serializable but still saw exception.

hibernate.connection.isolation 8

What seems to stop the exception was to uncomment
following:
hibernate.connection.autocommit true

This 'fix' is consistent with what I was saying.  If
commits are happening for every update, insert and
delete then connections in a pool would have 'image'
of the database refreshed more often too.

Having made this change you will now see a different
exception:

ERROR JDBCExceptionReporter:72 - Lexical error at line
1, column 329.  Encountered: "\"" (34), after : "."

What Mckoi does NOT like is the quotes on column names
like so: 
, bids1_."datetime" as datetime5_1_1_
, user2_."password" as password3_2_2_
, user2_."initial" as initial6_2_2_

You can see the offending sql by uncommenting
property:
hibernate.show_sql true

You can stop the quotes from being applied by changing
the hbm.xml files of Bid and User classes.  Just
remove the back-ticks surrounding datetime, initial
and password property column attributes.  See
following:

<property name="datetime" not-null="true" 
column="`datetime`"/>

<property name="initial" 
column="`initial`"/>

<property name="password" not-null="true" length="15" 
column="`password`"/>

(I've written about this before on this forum.)

After applying these changes, "build eg" should
execute successfully.

When I get a chance I am going to follow-up this issue
with Hibernate forum to see if a fix is possible for
Mckoi db.  I have an idea as to what to do.

Jim 



---------------------------------------------------------------
Mckoi SQL Database mailing list  http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]