[jboss-user] [EJB 3.0] - Re: Lazy loading for OneToOne association (entities share th

hoomey do-not-reply at jboss.com
Thu Aug 10 11:04:08 EDT 2006


Hi,

Thanks for submitting this clue.

However, in my case it doesn't help since:

1) I need to have the ID of C entity inherited from the parent when saving a new parent entity (the id is created using Oracle sequence)

1a) For what I have found, this is ONLY possible in bidirectional 1:1

Setting this (1:1) relation as many-one on A and one-many on C results in a NullPointerException when processing Element Annotations..

(I suppose that might be because I still have):


  | public EntityC getEntityC() {
  |     return entityC;
  | }

and not 


  | public Set<EntityC> getEntityC() {
  |     return entityC;
  | }
  | 

in my parent A entity...

On the other hand, making a bidirectional Set of real 1:1 relation doesn't make much sense to me :(

BR,
hoomey

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964393#3964393

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964393



More information about the jboss-user mailing list