-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: mapping multiple interfaces
PostPosted: Sat Dec 24, 2005 1:42 pm 
Newbie

Joined: Sat Dec 24, 2005 1:32 pm
Posts: 1
Hiya,

I have spent several days trying to figure this out. I have

class User Extends Contact implements Resource, CanLogin
{
...

}

In hibernate, I map contact as the superclass and all that works fine. I also mapped canlogin (since there are other objects that can login) and that works fine.

However, mapping resource does not work as expected. I have mapped the Resource Interface and it works fine as long it is not mapped as a field from other classes.

In this case, there is another class called ResourceTransfer that needs to map using many-to-one to the Resource Interface.

When mapping to the Resource interface, an additional table is created for resource and all inserts to resourcetransfer fails since the foreign key constraint to resource fails.

If I remove this table, inserts work fine, but "from Resource" fails with table not found.

Can someone please help me resolve this?

Best Wishes,


Shri


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.