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