Re: [appfuse-user] Problem with one-to-one mapping in appfuse

2010-05-28 Thread Kissue Kissue
Hi Dustin, I have removed the join column like you suggested and hibernate did the magic of creating foreign keys in both user and computer table. I guess that is the way it should work. Thanks. On Thu, May 27, 2010 at 3:38 PM, Dustin Pearce wrote: > Presumably, User and Computer have fields nam

Re: [appfuse-user] Problem with one-to-one mapping in appfuse

2010-05-27 Thread Dustin Pearce
Presumably, User and Computer have fields named id? You might want to try a different JoinColumn like user_id or just leave it out and see what hibernate's magic makes for you. -D On May 27, 2010, at 6:34 AM, Kissue Kissue wrote: > Hi Gurus, > > I am having problem with mapping one-to-one rel

[appfuse-user] Problem with one-to-one mapping in appfuse

2010-05-27 Thread Kissue Kissue
Hi Gurus, I am having problem with mapping one-to-one relationship in appfuse. Basically i have to objects, User and Computer. In User, i have the relationship mapped as follows: public class User{ @OneToOne(fetch=FetchType.LAZY) @JoinColumn(name="id") public Computer getComputer()