Hi All

I have three tables: A, B and C. C has fk to B and B has fk to A. If I have a situation where I create one entry for A, a1, then create two entries of B, b1, b2 both with fk to a1 and then finally create four entries of C where c1, c2 have fk to b1 and c3, c4 have fk to b2, so diagramatically things look like:-

a1 <- b1 <- c1
a1 <- b1 <- c2

a1 <- b2 <- c3
a1 <- b2 <- c4

Now when I load object a1 using OJB, is it possible to execute some SQL somewhere so that I could retrieve a count of all entries in table C that are linked to entry a1 i.e. the sql would look something like: select count(*) from C where BfkId=b1Id or BfkId=b2Id. Note I have xml with reference and collection descriptors working correctly for A, B and C.

Any comments or suggestions would be appreciated.

Regards
Mandip


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



Reply via email to