Mhmm, two things:
* Are you sure that the thing object is actually stored in the db, i.e. is there a row for it after the store call ?
As I'm currently testing it on HSQLDB, there is the script [with most of ojb internal parts cut off]:
CREATE TABLE SALE(A_ID INTEGER NOT NULL PRIMARY KEY,THING_ID INTEGER)
CREATE TABLE THING(A_ID INTEGER NOT NULL PRIMARY KEY)
ALTER TABLE SALE ADD CONSTRAINT SALE_FK_1 FOREIGN KEY(THING_ID) REFERENCES THING(A_ID)
/*C1*/CONNECT USER sa PASSWORD ""
SET AUTOCOMMIT FALSE
/*C2*/CONNECT USER sa PASSWORD ""
SET AUTOCOMMIT FALSE
INSERT INTO OJB_HL_SEQ VALUES('global - default sequence name','deprecatedColumn',10020,20,1)
COMMIT
SET AUTOCOMMIT TRUE
/*C1*/INSERT INTO THING VALUES(10002)
INSERT INTO SALE VALUES(10001,10002)
COMMIT
SET AUTOCOMMIT TRUE
..so I think, the "thing" row is there..
* The getCollectionByQuery call is not done within a transaction. I'm not sure whether that's supposed to work. Try changing it to:
No change - behaves equally.
Tom
Seems like cursed, doesn't it? :-)
Thanks for your concernment!
David
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]