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

Gail Badner (JIRA) noreply at atlassian.com
Wed Jul 21 15:49:35 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner resolved HHH-5378.
------------------------------

      Assignee: Gail Badner
    Resolution: Rejected

Indexed collections can not have mappedBy="...".

When HHH-5390 is fixed, an exception will be thrown when mappedBy="..." is used with an indexed collection.

> 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
>            Assignee: Gail Badner
>         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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list