hi roger,

i fixed the method setForeignKey. the vecor of strings is now converted into ForeignKeys.

jakob

Janssen, Roger schrieb:
hi,

this was the golden tip!

the implementation on how to set the foreignkey fields was changed, and our
code did set them the old way, thus the wrong way.

changed this for in our wrapper for setting foreignkey descriptors for
collection and reference descriptors and no the error does not occur any
more.

may be it is wise to remove the method setForeignKeyFields(Vector) because
it expects a vector of ForeignKey objects, but ForeignKey is an inner class
of ObjectReferenceDescriptor. i used this method passing a vector of
strings, where each string is an attributename, that's why it went wrong.
either do some typechecking and throw an exception that helps you as a user,
but i think it is best to remove it, because it think the overloaded method
addForeignKeyField should be used now.

thanx for the effort and time you have all spend!

Roger Janssen

-----Original Message-----
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 12, 2005 6:57 PM
To: OJB Users List
Subject: Re: BUG [CVS HEAD] : unable to query for classes which mappings
h ave been altered dynamically


hi robert,

imo the error occurs on line 162, where the entry is casted to ForeignKey

...
                 for (int i = 0; i < fkFields.size(); i++)
                 {
                     ForeignKey fk = (ForeignKey) fkFields.get(i);
                     FieldDescriptor fkfd;
...

this could only happen when the foreign key vector is set manually (using setForeignKey).

jakob


--------------------------------------------------------------------- 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