I am working with some code that must take the PK from an object (as a
ComboKey), flatten it to a string, then reconstitute the key and re-retrieve
the object.
I had thought we could do something like this:
String keyVal = comboKey.toString();
// do stuff
ComboKey newKey = new ComboKey(keyVal);
however this does not work for several reasons:
a) the ComboKey(String) ctor contains an endless loop which will eventually
run out of memory (test case written, submit after I know all the changes to
make!)
b) the ComboKey(String) and ComboKey(String[]) ctors will always throw
TorqueExceptions due to trying to call setValue(String) or
setValue(String[]) with the key member un-initialized, which
currently is not allowed.
I would like to modify ComboKey for the following:
toString will code each key portion with the key type
correct the endless loop in ComboKey(String)
ComboKey(String) will decode the portions into the correct key types, and
load the keys from this, no exception
I would also like to remove the exception from ComboKey(String[]), but I am
not quite sure the reason for this method..
If this all sounds reasonable, please let me know and I will submit changes,
with test code.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>