hi all,

after a sleep and further digging in the code i found that the source of the problem is the convertToSql ObjectReferenceDescriptor#getForeignKeyValues. conversion TO sql should be done ONLY when binding an sql-statement, that's what i've changed now.
so the identity-object will always carry the java format of key-values.


and of course we do NOT drop conversion of pk values. may be it was too late ;-)

hth
jakob

Jakob Braeuchi wrote:

hi andrew,

i changed Identity to do a convertToSql when called with an object, no conversion takes place when called with pkValues.
with this change all conversion test are passed. i have a version where conversion takes place during binding of the variables, but this version fails on the referrer test :(


should we drop conversion of pk values completely ?

jakob

Andrew Gilbert wrote:

Armin,

Thank you very much for this! I will build latest and re-test soon.
The bummer is, it would be a major impediment to our use of OJB if we couldn't convert on pk fields. We use a custom GUID impl for the pk in many of our BO's and tables.


Not sure I fully understand yet the Identity change. Sounds like you are saying internal state was inconsistent?



######
I think the made changes are correct, because the conversion
was not transparent for the user of the Identity object. I suggest
never use converted (java --> sql) pk fields within Identity
(I don't know if  code base is comply with this suggest,
maybe that's the reason for the hassle).
The conversion could be done when it's necessary.
But nevertheless I think there is a nasty bug when using
field conversion with pk fields.




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to