I don't know if it means a database id, or an internal hibernate id.
I have DB2 identity columns in my tables that are named "id".
Because they are identity columns, DB2 fills in the value at insert
time, and hibernate should know this (I've indicated so in my mapping).
Looking at my code, I see that it is using a single session, but the
developer used session.save() and sometimes session.saveOrUpdate(),
depending on whether session.contains(Object). Is this a bad idea?
I'm confused about how or whether to use session.save() or
session.saveOrUpdate().
Lets say I have a persistent client instance/bean. In my mapping I
have indicated that the client bean has a set of logins (a client
can have many logins), so I have indicated <one-to-many>. So there
is also a persistent set of logins associated w/ the client.
Let's say that I create a new Login, and I fill in the appropriate
FK in that bean relating to the client PK, and add it to the logins
set. How do I properly persist that new Login? Do I:
session.save( ), passing the Client bean
session.save( ), passing the Login set
session.save( ), passing the new Login bean
As I understand it, if I am using a single session, I can just ignore
session.save() altogether and just let Transaction.commit() do all
the work. Is this a better approach?
aj
>>Can anyone point me in the right direction or offer any advice? Is
>>hibernate attempting to insert something into the database that does
[quoted text clipped - 12 lines]
> Bye
> Georg