RE: Problem Inserting with Hibernate
James <[email protected]> Wed, 18 May 2005 19:45:40 -0700 (PDT)
| Newsgroups | gmane.comp.db.mckoi |
|---|---|
| Message-ID | <[email protected]> |
It's been a couple of days and no-one has offered any
help. So, foolishly I'll try.
I have used Hibernate Mckoi combination with success.
It has been my experience that any problems are
usually solved by making changes in the mapping files
and not in the code itself.
Are you using the same Academy.hbm.xml file for Mckoi
as you were for Access--i.e. without change?
You say one insert works. Sounds like you are trying
to use same primary key in two different inserts.
Where do the primary keys come from in Access? In
Mckoi, you have sequences. I suspect some
modification of your hbm file is in order.
here is a typical id entry in my hbm files.
<id name="id"
column="xxxxxx_ID"
type="long"
unsaved-value="0" >
<generator class="sequence">
<param
name="sequence">APP.hibernate_sequence</param>
</generator>
</id>
I use a single sequence defined in APP schema for all
tables in database instance.
Hope this gives you some clues as to where to make
adjustments in mapping files.
Best Regards, Jim
---------------------------------------------------------------
Mckoi SQL Database mailing list http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]