If you mean a single line of java code, then that's easy. Just set the appropriate cascade levels in your inverse="false" set/map/list/whatever.
If you mean that you want to issue a single SQL insert/update, and have it save everything in one statement, then no, that's not possible. Not all DBMSs support bulk inserts, and very few support bulk updates. Hibernate 3.1 did add support for bulk inserts, but it's very limited. I haven't used it yet, but you can read up on it in section 13.4, "DML-style operations", of the ref docs.
|