[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-3033) Generate Hibernate/JPA - ManyToOne is more preferable choice than OneToOne

Vitali Yemialyanchyk (JIRA) jira-events at lists.jboss.org
Wed Oct 29 09:30:24 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBIDE-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12435977#action_12435977 ] 

Vitali Yemialyanchyk commented on JBIDE-3033:
---------------------------------------------

currently ManyToOne is the annotation by default - it should be enough for beta1;
but for more complex cases - like 
org.hibernate.eclipse.jdt.ui.test\res\specimen\test\annotated\Person.java
org.hibernate.eclipse.jdt.ui.test\res\specimen\test\annotated\Foto.java
- now here is ManyToOne on both sides - it is workable,
but - i expect here should be One2One relation with
OneToOne annotations on both sides.
Also now it does not take into account user suggestion with mappedBy...

> Generate Hibernate/JPA - ManyToOne is more preferable choice than OneToOne
> --------------------------------------------------------------------------
>
>                 Key: JBIDE-3033
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-3033
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>    Affects Versions: 3.0.0.beta1
>            Reporter: Vitali Yemialyanchyk
>            Assignee: Vitali Yemialyanchyk
>             Fix For: 3.0.0.beta1
>
>
> OneToOne relation is much more constrained than ManyToOne. 
> So if there is no back reference - it is more likely this is ManyToOne relation.
> In the case of back reference  existence - ManyToOne will always be a safe bet,
> so in this ambiguous case ManyToOne seems is a better choice - 
> but this is thing for discussion - there are some questions here.
> + may be we should add some comments into sources.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list