Hi All, I'm running into an odd issue when I try to get persisted my entities, this is the case:
@Entity @Table(name = "school_application") @AttributeOverride(name = "id", column = @Column(name = "school_application_id")) SchoolApplicationBO extends BO{
..... Other properties
@ManyToOne @JoinColumn(name = "deg_type_id") private DegreeTypeBO degree;
.. Getters and setters }
@Entity @Table(name = "degree_type_cd") @AttributeOverride(name = "id", column = @Column(name = "deg_type_id")) public class DegreeTypeBO extends BO { ..... Other properties
@Column(name = "name") private String name;
.. Getters and setters }
When in my jsp I tried to change the degreeTypeDTO already associated to my SchoolApplicationDTO I get:
org.hibernate.HibernateException: identifier of an instance of com.talend.bo.DegreeTypeBO was altered from 1 to 20 at org.hibernate.event.def.DefaultFlushEntityEventListener.checkId(DefaultFlushEntityEventListener.java:85) at org.hibernate.event.def.DefaultFlushEntityEventListener.getValues(DefaultFlushEntityEventListener.java:190) at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:147) at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1175) ....
So, I'm not able to modify the degreeType that has assigned my schoolApplication.
Could any of you help me with that issue?
PD: I'm using: Hibernate: 3.5.4-Final and Spring 3.0.5.RELEASE
Thanks in advance.
|