Re: [appfuse-user] Hibernate help - sorted I think

2009-03-26 Thread tibi
this makes it eager: @ManyToMany(fetch = FetchType.EAGER,cascade=CascadeType.ALL) tibi wrote: > looks good. standard is lazy > > emmettwalsh wrote: > >> thanks folks, after a lot of playing about the following seems to work (to >> get the parents and the children objs), Im just worried tho

Re: [appfuse-user] Hibernate help - sorted I think

2009-03-25 Thread tibi
looks good. standard is lazy emmettwalsh wrote: > thanks folks, after a lot of playing about the following seems to work (to > get the parents and the children objs), Im just worried though that in a > table with a lot of associated users, that hibernate is 'eagerly' building > up a huge object gr

Re: [appfuse-user] Hibernate help - sorted I think

2009-03-25 Thread emmettwalsh
thanks folks, after a lot of playing about the following seems to work (to get the parents and the children objs), Im just worried though that in a table with a lot of associated users, that hibernate is 'eagerly' building up a huge object graph before I call the 'gets, or is it lazy by default

Re: [appfuse-user] Hibernate help

2009-03-25 Thread tibi
that is correct. and when you add the @manytoone the type will change from blob to int and will be to foreign key to superior tibi emmettwalsh wrote: > but I have to have a superior column as that will hold the id to the > 'parent' user ...? > > > > emmettwalsh wrote: > >> Hi, can anyone help

Re: [appfuse-user] Hibernate help

2009-03-25 Thread emmettwalsh
but I have to have a superior column as that will hold the id to the 'parent' user ...? emmettwalsh wrote: > > Hi, can anyone help me with this seemingly simple relationship Im trying > to model > > Basically I have a User class/object - which maps to a User table. I want > each user to cont

Re: [appfuse-user] Hibernate help

2009-03-25 Thread Kannan Ekanath
Sorry I think looking at your code deeply it must be a @ManyToOne :) On Wed, Mar 25, 2009 at 4:45 PM, Kannan Ekanath wrote: > That is because you are tagging getSuperior with a @Column. That is wrong. > you must say whether it is OneToOne or OneToMany :) Even if it is a relation > with itself > >

Re: [appfuse-user] Hibernate help

2009-03-25 Thread Kannan Ekanath
That is because you are tagging getSuperior with a @Column. That is wrong. you must say whether it is OneToOne or OneToMany :) Even if it is a relation with itself On Tue, Mar 24, 2009 at 8:16 PM, emmettwalsh wrote: > > Hi, can anyone help me with this seemingly simple relationship Im trying to