[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4609) One to Many as the Owner of the Association to update a Composite ID is failing as repeated column or bind variable not exist

Thirumavalavan (JIRA) noreply at atlassian.com
Tue Nov 24 15:48:08 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34756#action_34756 ] 

Thirumavalavan commented on HHH-4609:
-------------------------------------

Class Parent { 

 Set<Child> nbc; 

 @OneToMany 
 @JoinColumn(name="revId" , insertable=false,updatable=false,nullable=false) 

 Set<Child> getChild(){ 
   return nbc; 
 } 
} // end of Parent class 


IdClass=ChildPK.class 
Class Child { 

@Id 
Long revId; 

@Id 
Long pkgId; 

} 


Class ChildPK { 

Long revId; 
Long pkgId; 

} 

} 

> One to Many as the Owner of the Association to update a Composite ID is failing as repeated column or  bind variable not exist  
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-4609
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4609
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: annotations
>    Affects Versions: 3.3.2
>         Environment: Eclipse 3.2 , Windows XP , Hibernate 3.2/3.3.2  Annotation 3.4/3.3
>            Reporter: Thirumavalavan
>            Priority: Blocker
>
> I need an example of One to Many Unidirection as the responsible of the association 
> and the update happens on a Id field inside a composite class 
> Example 
> Class Parent {
>  Set<NBC>  nbc;
>  @OneToMany
>  @JoinColumn(name="revId" , insertable=false,updatable=false,nullable=false)
>  Set<NBC> getNBC(){
>    return nbc;
>  }
> } // end of Parent class
> IdClass=ChildPK.class
> Class Child {
> @Id
> Long revId;
> @Id
> Long pkgId;
> }
> Class ChildPK {
> Long revId;
> Long pkgId;
> }
> }
> I want the UNIDIRECTION One to Many to be resposible of updating the Child Composite Id - REV ID 
> Any help please . I tired with all possible insertable and updatable false and its not working 

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