We have a lot of cascade activity in our database, so that was a little disappointing. We then looked at implementing an Event, and that worked, but was not called for every cascade deleted event. Apparently the interceptor javadoc says that the interceptor is basically there to change properties on the object in question and should not involve the session at all. Someone on the Hibernate forums suggested using an Interceptor, but the Hibernate3 interceptors don't give us access to the Session to allow us to do a bulk update to null out these references. Was wondering if someone else here has run into this. Hibernate: DELETE from School where id = ? Hibernate: UPDATE Student set schoolId = NULL where schoolId = ? What we'd like to see happen is something like this: When we delete the school through the Hibernate layer, we are immediately receiving foreign key constraints because Hibernate does not null out the Students' schoolId columns where applicable. This is represented by a schoolId on the Student table. We have a relationship that is many-to-one (e.g. We use Spring/Hibernate3 in our app, and ran into kind of a bummer of a problem. 1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.8K Oracle Database Express Edition (XE).3.8K Java and JavaScript in the Database.# leakages when using DriverManagerConnectionProvider # # enable the following line if you want to track down connection # # set log levels - for more verbose logging change 'info' to 'debug' # Also I'm using eclipse with the standard project structure and have a copy of log4j.properties in both the root of the project folder and the bin folder. I tried commenting out the stdout lines in log4j.properties but no luck. I'm using hibernate 3 and want to stop it from dumping all the startup messages to the console.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |