[hibernate-issues] [Hibernate-JIRA] Moved: (HHH-4986) Hibernate interprets relation as embedding

Emmanuel Bernard (JIRA) noreply at atlassian.com
Tue Mar 9 08:11:48 EST 2010


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

Emmanuel Bernard moved HCANN-7 to HHH-4986:
-------------------------------------------

    Affects Version/s:     (was: 3.2)
                  Key: HHH-4986  (was: HCANN-7)
              Project: Hibernate Core  (was: Hibernate Commons Annotations)

> Hibernate interprets relation as embedding
> ------------------------------------------
>
>                 Key: HHH-4986
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4986
>             Project: Hibernate Core
>          Issue Type: Bug
>         Environment: Mac OS X (leopard); Java 1.5 or 1.6; MySQL, HSQLDB
>            Reporter: Lucius Gregory Meredith
>
> Hibernate interprets JPA annotations
> @Entity
> ...
> public class ... {
> ...
> @OneToOne
> @JoinColumn
> <MethodDecl>
> ...}
> as indication to embed the referenced entity, rather than use the key.
> For code sample see http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate
> Instructions for use:
> i included the target dir in the repo to speed up investigation, but you can just blow that away and build from scratch. The example is currently written to Java1.6, but also exhibits the same behavior under Java1.5. To run the example
> > svn co http://svn.biosimilarity.com/src/open/codesamples/trunk/hibernate
> ...
> > env PATH=<path-to-java1.6>:$PATH JAVA_HOME=<path-to-java1.6> mvn clean compile process-classes
> If you switch comment and decl at line 22 in src/main/java/maxb/hbex2/MySampleFuContainer.java then you see the error. The schema goes from
> create table lingo_production.MySampleFuContainer_table (
>         id_AbstractContainer varchar(255) not null,
>         varchar(255) not null,
>         uuid varchar(255),
>         mysamplingmumble__idSuper varchar(255),
>         primary key (id),
>         unique (uuid)
>     );
> to
> create table lingo_production.MySampleFuContainer_table (
>         id_AbstractContainer varchar(255) not null,
>         id varchar(255),
>         mysamplingmumble_ tinyblob,
>         uuid varchar(255),
>         primary key (id_AbstractContainer),
>         unique (id_AbstractContainer)
>     );

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