-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Strange behaviour when inserting
PostPosted: Tue Oct 18, 2005 12:38 pm 
Newbie

Joined: Fri Oct 14, 2005 2:35 pm
Posts: 14
When I try and do a save() on the object that is mapped below it does an insert, deletes what it inserted and then inserts it again. I'm not at all sure what is going on. The big problem is that when done in unit tests it does that final insert and everything is fine so I didn't even catch this until I started using it in my webapp. When I try and save an entity in my webapp the save() actually deletes all the other entries in the revman_course_instructor_influence_functions table.

Any ideas what is going on here?

Thanks

Hibernate version:
3.0.5

Mapping documents:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
    <class name="com.contentconnections.revman.course.InstructorInfluences" table="revman_course_instructors">
        <composite-id name="id" class="com.contentconnections.revman.course.InstructorInfluencesId">
            <key-property name="courseId" />
            <key-property name="instructorId" />
        </composite-id>

        <many-to-one name="course" class="com.contentconnections.revman.course.Course" column="courseId" insert="false" update="false" />
        <many-to-one name="instructor" class="com.contentconnections.revman.contact.Contact" column="instructorId" insert="false" update="false" />

        <set name="influenceFunctions" table="revman_course_instructor_influence_functions">
            <key>
                <column name="courseId" />
                <column name="instructorId" />
            </key>
            <many-to-many column="influenceFunctionId" class="com.contentconnections.revman.course.InfluenceFunction"/>
        </set>
    </class>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():
Code:
        Set influenceSet = new HashSet ();
        influenceSet.add (influenceFunction1);
        influenceSet.add (influenceFunction2);
           
        InstructorInfluencesId id = new InstructorInfluencesId ();
        id.setCourseId (course.getId ());
        id.setInstructorId (instructor.getId ());
       
        InstructorInfluences instructorInfluences = new InstructorInfluences ();
        instructorInfluences.setId (id);
        instructorInfluences.setCourse (course);
        instructorInfluences.setInstructor (instructor);
        instructorInfluences.setInfluenceFunctions (influences);
       
        getHibernateTemplate ().save (instructorInfluences);

Name and version of the database you are using:
Mysql 4.1.14

Debug level Hibernate log excerpt:
Quote:
2005-10-18 09:22:55,352 13806 DEBUG [main] org.hibernate.event.def.DefaultSaveOrUpdateEventListener (DefaultSaveOrUpdateEventListener.java:159) - saving transient instance
2005-10-18 09:22:55,352 13806 DEBUG [main] org.hibernate.event.def.AbstractSaveEventListener (AbstractSaveEventListener.java:100) - generated identifier: component[courseId,instructorId]{instructorId=2, courseId=2}, using strategy: org.hibernate.id.Assigned
2005-10-18 09:22:55,352 13806 DEBUG [main] org.hibernate.event.def.AbstractSaveEventListener (AbstractSaveEventListener.java:133) - saving [com.contentconnections.revman.course.InstructorInfluences#component[courseId,instructorId]{instructorId=2, courseId=2}]
2005-10-18 09:22:55,353 13807 DEBUG [main] org.hibernate.event.def.WrapVisitor (WrapVisitor.java:86) - Wrapped collection in role: com.contentconnections.revman.course.InstructorInfluences.influenceFunctions
2005-10-18 09:22:55,353 13807 DEBUG [main] org.hibernate.engine.Cascades (Cascades.java:526) - id unsaved-value: null
2005-10-18 09:22:55,355 13809 DEBUG [main] org.hibernate.engine.Cascades (Cascades.java:526) - id unsaved-value: null
2005-10-18 09:22:55,358 13812 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:52) - flushing session
2005-10-18 09:22:55,358 13812 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:102) - processing flush-time cascades
2005-10-18 09:22:55,358 13812 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:150) - dirty checking collections
2005-10-18 09:22:55,359 13813 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:167) - Flushing entities and processing referenced collections
2005-10-18 09:22:55,359 13813 DEBUG [main] org.hibernate.event.def.WrapVisitor (WrapVisitor.java:86) - Wrapped collection in role: com.contentconnections.revman.course.InstructorInfluences.influenceFunctions
2005-10-18 09:22:55,359 13813 DEBUG [main] org.hibernate.engine.Collections (Collections.java:140) - Collection found: [com.contentconnections.revman.course.InstructorInfluences.influenceFunctions#component[courseId,instructorId]{instructorId=2, courseId=2}], was: [<unreferenced>] (initialized)
2005-10-18 09:22:55,360 13814 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:203) - Processing unreferenced collections
2005-10-18 09:22:55,360 13814 DEBUG [main] org.hibernate.engine.Collections (Collections.java:90) - Found collection with unloaded owner: [<unreferenced>]
2005-10-18 09:22:55,360 13814 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:217) - Scheduling collection removes/(re)creates/updates
2005-10-18 09:22:55,360 13814 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:79) - Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
2005-10-18 09:22:55,361 13815 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:85) - Flushed: 1 (re)creations, 0 updates, 0 removals to 2 collections
2005-10-18 09:22:55,361 13815 DEBUG [main] org.hibernate.pretty.Printer (Printer.java:83) - listing entities:
2005-10-18 09:22:55,361 13815 DEBUG [main] org.hibernate.pretty.Printer (Printer.java:90) - com.contentconnections.revman.course.InstructorInfluences{instructor=com.contentconnections.revman.contact.Contact#2, influenceFunctions=[com.contentconnections.revman.course.InfluenceFunction#2, com.contentconnections.revman.course.InfluenceFunction#1], course=com.contentconnections.revman.course.Course#2, id=component[courseId,instructorId]{instructorId=2, courseId=2}}
2005-10-18 09:22:55,362 13816 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:267) - executing flush
2005-10-18 09:22:55,362 13816 DEBUG [main] org.hibernate.persister.entity.BasicEntityPersister (BasicEntityPersister.java:1825) - Inserting entity: [com.contentconnections.revman.course.InstructorInfluences#component[courseId,instructorId]{instructorId=2, courseId=2}]
2005-10-18 09:22:55,362 13816 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:290) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-10-18 09:22:55,362 13816 DEBUG [main] org.hibernate.SQL (AbstractBatcher.java:324) - insert into revman_course_instructors (courseId, instructorId) values (?, ?)
2005-10-18 09:22:55,363 13817 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:378) - preparing statement
2005-10-18 09:22:55,363 13817 DEBUG [main] org.hibernate.persister.entity.BasicEntityPersister (BasicEntityPersister.java:1612) - Dehydrating entity: [com.contentconnections.revman.course.InstructorInfluences#component[courseId,instructorId]{instructorId=2, courseId=2}]
2005-10-18 09:22:55,364 13818 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 1
2005-10-18 09:22:55,364 13818 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 2
2005-10-18 09:22:55,364 13818 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (BatchingBatcher.java:27) - Adding to batch
2005-10-18 09:22:55,366 13820 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (BatchingBatcher.java:54) - Executing batch size: 1
2005-10-18 09:22:55,366 13820 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575366|0|30|statement|insert into revman_course_instructors (courseId, instructorId) values (?, ?)|insert into revman_course_instructors (courseId, instructorId) values (2, 2)
2005-10-18 09:22:55,366 13820 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:298) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-10-18 09:22:55,367 13821 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:416) - closing statement
2005-10-18 09:22:55,367 13821 DEBUG [main] org.hibernate.persister.collection.AbstractCollectionPersister (AbstractCollectionPersister.java:879) - Inserting collection: [com.contentconnections.revman.course.InstructorInfluences.influenceFunctions#component[courseId,instructorId]{instructorId=2, courseId=2}]
2005-10-18 09:22:55,367 13821 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:290) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-10-18 09:22:55,368 13822 DEBUG [main] org.hibernate.SQL (AbstractBatcher.java:324) - insert into revman_course_instructor_influence_functions (courseId, instructorId, influenceFunctionId) values (?, ?, ?)
2005-10-18 09:22:55,368 13822 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:378) - preparing statement
2005-10-18 09:22:55,368 13822 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 1
2005-10-18 09:22:55,369 13823 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 2
2005-10-18 09:22:55,369 13823 DEBUG [main] org.hibernate.engine.Cascades (Cascades.java:526) - id unsaved-value: null
2005-10-18 09:22:55,369 13823 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 3
2005-10-18 09:22:55,370 13824 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (BatchingBatcher.java:27) - Adding to batch
2005-10-18 09:22:55,370 13824 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:154) - reusing prepared statement
2005-10-18 09:22:55,370 13824 DEBUG [main] org.hibernate.SQL (AbstractBatcher.java:324) - insert into revman_course_instructor_influence_functions (courseId, instructorId, influenceFunctionId) values (?, ?, ?)
2005-10-18 09:22:55,371 13825 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 1
2005-10-18 09:22:55,371 13825 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 2
2005-10-18 09:22:55,371 13825 DEBUG [main] org.hibernate.engine.Cascades (Cascades.java:526) - id unsaved-value: null
2005-10-18 09:22:55,372 13826 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '1' to parameter: 3
2005-10-18 09:22:55,372 13826 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (BatchingBatcher.java:27) - Adding to batch
2005-10-18 09:22:55,372 13826 DEBUG [main] org.hibernate.persister.collection.AbstractCollectionPersister (AbstractCollectionPersister.java:922) - done inserting collection: 2 rows inserted
2005-10-18 09:22:55,373 13827 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (BatchingBatcher.java:54) - Executing batch size: 2
2005-10-18 09:22:55,373 13827 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575373|0|30|statement|insert into revman_course_instructor_influence_functions (courseId, instructorId, influenceFunctionId) values (?, ?, ?)|insert into revman_course_instructor_influence_functions (courseId, instructorId, influenceFunctionId) values (2, 2, 1)
2005-10-18 09:22:55,373 13827 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:298) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-10-18 09:22:55,374 13828 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:416) - closing statement
2005-10-18 09:22:55,374 13828 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:294) - post flush
2005-10-18 09:22:55,376 13830 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575376|0|30|statement||select COURSEID, INSTRUCTORID from REVMAN_COURSE_INSTRUCTORS order by COURSEID, INSTRUCTORID
2005-10-18 09:22:55,376 13830 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575376|-1||resultset|select COURSEID, INSTRUCTORID from REVMAN_COURSE_INSTRUCTORS order by COURSEID, INSTRUCTORID|
2005-10-18 09:22:55,377 13831 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575377|-1||resultset|select COURSEID, INSTRUCTORID from REVMAN_COURSE_INSTRUCTORS order by COURSEID, INSTRUCTORID|
2005-10-18 09:22:55,377 13831 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575377|-1||resultset|select COURSEID, INSTRUCTORID from REVMAN_COURSE_INSTRUCTORS order by COURSEID, INSTRUCTORID|
2005-10-18 09:22:55,378 13832 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:52) - flushing session
2005-10-18 09:22:55,378 13832 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:102) - processing flush-time cascades
2005-10-18 09:22:55,378 13832 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:150) - dirty checking collections
2005-10-18 09:22:55,378 13832 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:167) - Flushing entities and processing referenced collections
2005-10-18 09:22:55,379 13833 DEBUG [main] org.hibernate.event.def.WrapVisitor (WrapVisitor.java:86) - Wrapped collection in role: com.contentconnections.revman.course.InstructorInfluences.influenceFunctions
2005-10-18 09:22:55,379 13833 DEBUG [main] org.hibernate.engine.Collections (Collections.java:140) - Collection found: [com.contentconnections.revman.course.InstructorInfluences.influenceFunctions#component[courseId,instructorId]{instructorId=2, courseId=2}], was: [<unreferenced>] (initialized)
2005-10-18 09:22:55,379 13833 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:203) - Processing unreferenced collections
2005-10-18 09:22:55,380 13834 DEBUG [main] org.hibernate.engine.Collections (Collections.java:90) - Found collection with unloaded owner: [<unreferenced>]
2005-10-18 09:22:55,380 13834 DEBUG [main] org.hibernate.engine.Collections (Collections.java:50) - Collection dereferenced: [com.contentconnections.revman.course.InstructorInfluences.influenceFunctions#component[courseId,instructorId]{instructorId=2, courseId=2}]
2005-10-18 09:22:55,380 13834 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:217) - Scheduling collection removes/(re)creates/updates
2005-10-18 09:22:55,380 13834 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:79) - Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
2005-10-18 09:22:55,381 13835 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:85) - Flushed: 1 (re)creations, 0 updates, 1 removals to 3 collections
2005-10-18 09:22:55,381 13835 DEBUG [main] org.hibernate.pretty.Printer (Printer.java:83) - listing entities:
2005-10-18 09:22:55,381 13835 DEBUG [main] org.hibernate.pretty.Printer (Printer.java:90) - com.contentconnections.revman.course.InstructorInfluences{instructor=com.contentconnections.revman.contact.Contact#2, influenceFunctions=[com.contentconnections.revman.course.InfluenceFunction#2, com.contentconnections.revman.course.InfluenceFunction#1], course=com.contentconnections.revman.course.Course#2, id=component[courseId,instructorId]{instructorId=2, courseId=2}}
2005-10-18 09:22:55,382 13836 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:267) - executing flush
2005-10-18 09:22:55,382 13836 DEBUG [main] org.hibernate.persister.collection.AbstractCollectionPersister (AbstractCollectionPersister.java:830) - Deleting collection: [com.contentconnections.revman.course.InstructorInfluences.influenceFunctions#component[courseId,instructorId]{instructorId=2, courseId=2}]
2005-10-18 09:22:55,382 13836 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:290) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-10-18 09:22:55,382 13836 DEBUG [main] org.hibernate.SQL (AbstractBatcher.java:324) - delete from revman_course_instructor_influence_functions where courseId=? and instructorId=?
2005-10-18 09:22:55,383 13837 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:378) - preparing statement
2005-10-18 09:22:55,383 13837 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 1
2005-10-18 09:22:55,384 13838 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 2
2005-10-18 09:22:55,384 13838 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (BatchingBatcher.java:27) - Adding to batch
2005-10-18 09:22:55,384 13838 DEBUG [main] org.hibernate.persister.collection.AbstractCollectionPersister (AbstractCollectionPersister.java:857) - done deleting collection
2005-10-18 09:22:55,386 13840 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (BatchingBatcher.java:54) - Executing batch size: 1
2005-10-18 09:22:55,386 13840 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575386|0|30|statement|delete from revman_course_instructor_influence_functions where courseId=? and instructorId=?|delete from revman_course_instructor_influence_functions where courseId=2 and instructorId=2
2005-10-18 09:22:55,386 13840 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:298) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-10-18 09:22:55,387 13841 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:416) - closing statement
2005-10-18 09:22:55,387 13841 DEBUG [main] org.hibernate.persister.collection.AbstractCollectionPersister (AbstractCollectionPersister.java:879) - Inserting collection: [com.contentconnections.revman.course.InstructorInfluences.influenceFunctions#component[courseId,instructorId]{instructorId=2, courseId=2}]
2005-10-18 09:22:55,387 13841 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:290) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-10-18 09:22:55,388 13842 DEBUG [main] org.hibernate.SQL (AbstractBatcher.java:324) - insert into revman_course_instructor_influence_functions (courseId, instructorId, influenceFunctionId) values (?, ?, ?)
2005-10-18 09:22:55,388 13842 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:378) - preparing statement
2005-10-18 09:22:55,388 13842 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 1
2005-10-18 09:22:55,389 13843 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 2
2005-10-18 09:22:55,389 13843 DEBUG [main] org.hibernate.engine.Cascades (Cascades.java:526) - id unsaved-value: null
2005-10-18 09:22:55,389 13843 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 3
2005-10-18 09:22:55,390 13844 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (BatchingBatcher.java:27) - Adding to batch
2005-10-18 09:22:55,390 13844 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:154) - reusing prepared statement
2005-10-18 09:22:55,390 13844 DEBUG [main] org.hibernate.SQL (AbstractBatcher.java:324) - insert into revman_course_instructor_influence_functions (courseId, instructorId, influenceFunctionId) values (?, ?, ?)
2005-10-18 09:22:55,390 13844 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 1
2005-10-18 09:22:55,391 13845 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '2' to parameter: 2
2005-10-18 09:22:55,391 13845 DEBUG [main] org.hibernate.engine.Cascades (Cascades.java:526) - id unsaved-value: null
2005-10-18 09:22:55,391 13845 DEBUG [main] org.hibernate.type.LongType (NullableType.java:59) - binding '1' to parameter: 3
2005-10-18 09:22:55,392 13846 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (BatchingBatcher.java:27) - Adding to batch
2005-10-18 09:22:55,392 13846 DEBUG [main] org.hibernate.persister.collection.AbstractCollectionPersister (AbstractCollectionPersister.java:922) - done inserting collection: 2 rows inserted
2005-10-18 09:22:55,392 13846 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (BatchingBatcher.java:54) - Executing batch size: 2
2005-10-18 09:22:55,393 13847 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575393|0|30|statement|insert into revman_course_instructor_influence_functions (courseId, instructorId, influenceFunctionId) values (?, ?, ?)|insert into revman_course_instructor_influence_functions (courseId, instructorId, influenceFunctionId) values (2, 2, 1)
2005-10-18 09:22:55,393 13847 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:298) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-10-18 09:22:55,393 13847 DEBUG [main] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:416) - closing statement
2005-10-18 09:22:55,394 13848 DEBUG [main] org.hibernate.event.def.AbstractFlushingEventListener (AbstractFlushingEventListener.java:294) - post flush
2005-10-18 09:22:55,395 13849 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575395|0|30|statement||select COURSEID, INSTRUCTORID, INFLUENCEFUNCTIONID from REVMAN_COURSE_INSTRUCTOR_INFLUENCE_FUNCTIONS order by COURSEID, INSTRUCTORID, INFLUENCEFUNCTIONID
2005-10-18 09:22:55,396 13850 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575396|-1||resultset|select COURSEID, INSTRUCTORID, INFLUENCEFUNCTIONID from REVMAN_COURSE_INSTRUCTOR_INFLUENCE_FUNCTIONS order by COURSEID, INSTRUCTORID, INFLUENCEFUNCTIONID|
2005-10-18 09:22:55,396 13850 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575396|-1||resultset|select COURSEID, INSTRUCTORID, INFLUENCEFUNCTIONID from REVMAN_COURSE_INSTRUCTOR_INFLUENCE_FUNCTIONS order by COURSEID, INSTRUCTORID, INFLUENCEFUNCTIONID|
2005-10-18 09:22:55,396 13850 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575396|-1||resultset|select COURSEID, INSTRUCTORID, INFLUENCEFUNCTIONID from REVMAN_COURSE_INSTRUCTOR_INFLUENCE_FUNCTIONS order by COURSEID, INSTRUCTORID, INFLUENCEFUNCTIONID|
2005-10-18 09:22:55,397 13851 INFO [main] p6spy (Log4jLogger.java:95) - 1129652575397|-1||resultset|select COURSEID, INSTRUCTORID, INFLUENCEFUNCTIONID from REVMAN_COURSE_INSTRUCTOR_INFLUENCE_FUNCTIONS order by COURSEID, INSTRUCTORID, INFLUENCEFUNCTIONID|


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 18, 2005 2:39 pm 
Newbie

Joined: Fri Oct 14, 2005 2:35 pm
Posts: 14
A little more information. In the webapp it deletes all the other entries in the revman_course_instructor_influences table for the same course id as those being added and then readds them. This shouldn't be a huge impact on performance for my application in the short term because the number of entries for a particular course should be fairly small, like a dozen or two entries. The performance may take a bigger hit as the table continues to grow.

I can't believe that this is expected behaviour. I'm sure it's something I'm doing wrong, maybe with the mapping using the composite-id and having a many-to-many relationship. Should I chuck the composite-id? If I do how can I make the course id and instructor id combination unique?

I'm curious if anyone has any ideas why this is happening and how I can fix it?

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.