From: Thomas B. (JIRA) <no...@at...> - 2006-05-29 13:43:19
|
property update="false" ignored since 3.2.0.cr2 ----------------------------------------------- Key: HHH-1791 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1791 Project: Hibernate3 Type: Bug Components: core Versions: 3.2.0.cr2 Environment: Hibernate 3.2.0.cr2, MS SQL Server 2000, jTDS Reporter: Thomas Boerkel Mapping: <class name="p2plus.AuftragPos" table="AUFTRAGPOS"> <cache usage="read-write"/> <composite-id> <key-property name="auftrag" access="field"/> <key-property name="position" access="field"/> </composite-id> <version name="timestamp" type="byte[]" generated="always" access="field"/> <property name="id" access="field" generated="insert" update="false" insert="false"/> <property name="artikel" access="field"/> <property name="preis" access="field"/> <property name="datum" access="field"/> </class> I fetch an object, change a property and save. Hibernate 3.2.0.cr1 executes: update AUFTRAGPOS set artikel=?, preis=?, datum=? where auftrag=? and position=? and timestamp=? Hibernate 3.2.0.cr2 executes: update AUFTRAGPOS set id=?, artikel=?, preis=?, datum=? where auftrag=? and position=? and timestamp=? Code: Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); AuftragPos auftragPos = new AuftragPos(); auftragPos.setAuftrag("4711"); auftragPos.setPosition((short)3); auftragPos.setArtikel("V-10000"); auftragPos.setPreis(45); auftragPos.setDatum(new Date()); session.save(auftragPos); auftragPos = (AuftragPos)session.createQuery("from AuftragPos where position=3").uniqueResult(); auftragPos.setPreis(78); session.save(auftragPos); session.getTransaction().commit(); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |