Hi Thomas,

Thanks very much for your offer. I'm not sure whether it makes sense if the
code adjustment task is distributed between different people, but I would
definitely welcome some help in the documentation.
(Almost) anytime. I didn't think of code adjustment. For some magic reason, my changes to Criteria.addJoin() use the same signature and constants :-) I offer another test platform.

One last thing. I found the handling of inserts a little bit poor. From
what I know the "insert into ... select ... from" statement is SQL
standard. I thought of something like

doInsert(Criteria whichcolumns, Criteria select);

Anyone cares to comment?


I am at a complete loss what above code would do, but I guess this is because my limited knowledge in SQL.

Easy. My idea goes like this. ANSI-SQL allows statements like

INSERT INTO person_has_address(IDADDRESS, IDPERSON)
SELECT address.id, person.id from address, person
  WHERE person.lname='Sherman' and person.fname='P.'
    AND address.street='42 Wallaby Way' and address.city='Sydney'

The select part is delivered by the Criteria object "select" as usual. The second Criteria object "whichcolumns" would the table and columns where to insert the selected data. This would be very handy for m:n relation tables like in the example above, especially if the select statement delivers a big number of results.

Bye, Thomas.

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



Reply via email to