[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5378?page=c...
]
Jürgen Zimmermann updated HHH-5378:
-----------------------------------
Attachment: testcase-HHH-5378.zip
The "Maven-ized" testcase reproduces the issue by using the one-to-many
relationship between the classes Customer and Order.
Just invoke "mvn test":
* The H2 database ~/hs/HHH_5378 with the according tables is generated (or replaced)
* JUnit test classes are compiled and invoked
* log4j log file is produced as target/testcase.log
You'll see that Hibernate creates a SQL insert statement and ignores the index resp.
ordering column.
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
Attachments: testcase-HHH-5378.zip
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira