>I have a couple of problems trying to do updates thru Hibernate.

Which version, John? I have been messing around a bit the last couple of
days - and I may possibly have broken something without causing the tests
to fail. (Which is a worrying that things could break without testsuite
knowing but lets deal with *that* after....)

Can you observe the same broken behaviour in 1.0.1?

>
>1) I have a class with a collection.  When I load the class, hibernate
tries
>to update the foreign key on the collection table (and tries to set it to
>NULL no less).  Here's the mapping:
>
>The code to read a message looks like this:
>
>    Message message = null;
>    MessageBoxEntry entry =
>(MessageBoxEntry)session.load(MessageBoxEntry.class, aMessageBoxEntryId);
>    if (entry != null) {
>         message = entry.getMessage();
>    }

>Why is it trying to set message_id to null?  Why is it trying to update
>message_id on message_addressee at all?

It shouldn't be. I can't quite explain this. Can you tell if a flush() has
occurred for some reason? (Since that is the only excuse for an update to
occur.) Please set logging to TRACE for the cirrus.hibernate category +
post a log for the whole session.

We need to figure *this* out ASAP.

>2) Build a message with multiple addressees.  I try to save the message
and
>get a "com.sybase.jdbc2.jdbc.SybBatchUpdateException: JZ0BE:
>BatchUpdateException: Error occurred while executing batch statement: ASA
>Error -143: Column '@p1' not found" SQL Exception.  Here is the SQL:
>
>How does one fix this?  Have I mapped the collection incorrectly?

Ah. interesting. My Sybase install broke a while back so I didn't get a
chance to test its JDBC2 compliance. I imagine that setting

hibernate.use_jdbc2=false

will fix your problem. Could you please try this out? If it *does* fix the
problem, i'll have to change the default SybaseDialect properties to
disable JDBC2 support. Actually, just for an experiment ... could you
please try using a vm.long style id generation and see if you recieve the
same exception? (just to rule out the possibility that native keygeneration
has anything to do with it....)

Also, please verify you have the latest Sybase JDBC driver.

Thanks

Gavin



-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
Hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to