[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5378) 3.5.3: @OrderColumn not updated when inserting

Jürgen Zimmermann (JIRA) noreply at atlassian.com
Tue Jul 13 06:11:13 EDT 2010


3.5.3: @OrderColumn not updated when inserting
----------------------------------------------

                 Key: HHH-5378
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5378
             Project: Hibernate Core
          Issue Type: Bug
          Components: entity-manager
    Affects Versions: 3.5.3
         Environment: JDK 1.6_20, Hibernate 3.5.3, Spring 3.0.3, Tomcat 7.0.0-beta
            Reporter: Jürgen Zimmermann


I'm having an abstract entity class "AbstractKunde" und a derived class "Privatkunde" (see below). AbstractKunde references one-to-many the entity class "Bestellung" and also defines @OrderColumn.

However, when I create a new Bestellung object, then the column for @OrderColumn isn't updated.

@Entity
@Table(name = "kunde")
@Inheritance
@DiscriminatorColumn(name = "art", length = 1)
...
public abstract class AbstractKunde implements java.io.Serializable {
...
	@OneToMany(mappedBy = "kunde")
	@OrderColumn(name = "idx")
	private List<Bestellung> bestellungen;
...
}

@Entity
@Table(name = "bestellung")
...
public class Bestellung implements java.io.Serializable {
...
	@ManyToOne(optional = false)
	@JoinColumn(name = "kunde_fk")
	@NotNull(message = "{bestellverwaltung.bestellung.kunde.notNull}")
	private AbstractKunde kunde;
...
}

@Entity
@DiscriminatorValue("P")
public class Privatkunde extends AbstractKunde {
...
}

-- 
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

       



More information about the hibernate-issues mailing list