1. DOM4J and composite-id : ClassXastException forum.hibernate.orgHibernate version: 3.2 Mapping documents: |
2. EntityMode.DOM4J problem with composite Id forum.hibernate.orgI have a persistent object [code]@Entity @Table(name="RTSP_URL") @IdClass(KeyUrlRtsp.class) public class UrlRtsp implements Serializable { @Id @Column(name="DEVICE_ID") private Integer deviceId; @Id @Column(name="QUALITY_NAME") private String quality; ... }[/code] I serialized the an database Object out an XML file using the EntityMode.DOM4J, then tried to deserialize and insert the the dom4j element to the database. The composite key is not properly deserialized. The following ... |
3. Problem with DOM4J persistence and composite keys forum.hibernate.orgjava.lang.ClassCastException: ch.legando.data.hibernate.CompositeKey at org.hibernate.property.Dom4jAccessor$ElementGetter.get(Dom4jAccessor.java:215) at org.hibernate.tuple.component.AbstractComponentTuplizer.getPropertyValue(AbstractComponentTuplizer.java:87) at org.hibernate.tuple.component.AbstractComponentTuplizer.getPropertyValues(AbstractComponentTuplizer.java:93) at org.hibernate.type.ComponentType.getPropertyValues(ComponentType.java:376) at org.hibernate.type.ComponentType.getHashCode(ComponentType.java:207) at org.hibernate.engine.EntityKey.generateHashCode(EntityKey.java:126) at org.hibernate.engine.EntityKey. |