Hi *,
we have an existing legacy database schema to which we have to map our new domain model. Currently EclipseLink is used as JPA implementation but because of the tighter integration with JBoss we want to migrate to Hibernate. Because of the complexity of the mapping to that database schema we have to execute more than one SQL insert statement for some entities. Those insert statements cannot be extracted into a stored procedure since they are derived from the entity that has to be stored and its associated entities.
Is there a way in Hibernate to programmatically customize the SQL insert queries executed when persisting an entity? E.g. something like the 'DescriptorCustomizer' concept in EclipseLink?
Thanks in advance, Thomas
|