1. Inserting Collection with version tag forum.hibernate.orgI have a cutomer object that contains a collection of phone objects. The mapping file looks like this ( Note both tables use the version tag). customer.hbm.xml |
2. Versioning and update/insert behavior forum.hibernate.org/** * Assume the transient instance is newly instantiated if the version * is null, otherwise defer to the identifier unsaved-value. */ public static final VersionValue VERSION_UNDEFINED = new VersionValue() { public final Boolean isUnsaved(Object version) { log.trace("version unsaved-value strategy UNDEFINED"); return version==null ? Boolean.TRUE : ... |
3. Can't get |
4. Update not Insert when version matches unsaved-value forum.hibernate.orgNewbie Joined: Wed Jun 04, 2008 10:05 am Posts: 1 Hi I'm having a bit of an issue with version. When the value of the version matches the value of my version's unsaved-value, hibernate is issuing an SQL UPDATE instead of an SQL INSERT. I am trying to do it this way as I would like the ID to be application ... |