Beginner |
|
Joined: Sun Oct 16, 2005 12:37 pm Posts: 47 Location: Romania, Galati
|
I have one master table and twelve partition tables for each month. I have twelve rules that insert rows into correct partition table (after column "timpul" - timestamp). What is wrong? I real need partition tables...:(.
Hibernate version:8.1.3
Mapping documents: Master.hbm.xml <class name="unu.model.Master" table="master" schema="public" dynamic-insert="true" dynamic-update="true" lazy="true"> <id name="masterid" type="int"> <column name="masterid" /> <generator class="sequence"> <param name="sequence">seq_master</param> </generator> </id> <property name="nume" type="string"> <column name="nume" length="25" not-null="true" unique="true" /> </property> <property name="timpul" type="timestamp"> <column name="timpul" length="8" not-null="true" /> </property> </class>
Code between sessionFactory.openSession() and session.close(): tx = session.beginTransaction(); Master master = new Master(); master.setNume("Master11"); master.setTimpul(new Date()); session.save(master); tx.commit();
Full stack trace of any exception that occurs: org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1 at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:93) at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:79) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at unu.Hibernate.main(Hibernate.java:85)
Name and version of the database you are using:PostgreSQL-8.1
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
|
|