We have several projects in which a one-to-many relationship (cascading on) must be persisted using stored procedures which perform internal auditing; direct CRUD SQL calls are not allowed on any of our tables:
Code:
FooObject --> Persister --> insert_foo_proc --> FOO_TABLE
Currently, Hibernate must use its own CollectionPersister and does not allow the definition of a custom Collection persister. Therefore, the paradigm described above works well for the "one" side and for other independent entities, but fails for the "many" side, as Hibernate tries to issue CRUD SQL directly against the table rather than using a custom persister (See
HB-326).
We are unable to proceed with Hibernate and may have to migrate to Toplink unless we can resolve this issue. We'd like to hear any suggestions or input on the following:
- What level of difficulty might we be facing if we wanted to do the work to allow custom Collection persisters in Hibernate? We have resources available to work on this change, but we will need some guidance as to the best approach.
- What might make a good workaround for persisting this Set ourselves as cleanly as possible, using as much of what Hibernate provides as possible?
Any input is greatly appreciated.
Cisco Systems EMAN Framework Team
--
Opinions expressed may not reflect the views of Cisco Systems.