-->
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.  [ 2 posts ] 
Author Message
 Post subject: select in different tables
PostPosted: Thu Mar 15, 2007 8:13 am 
Newbie

Joined: Thu Mar 15, 2007 8:03 am
Posts: 8
Hi all,

i'm a principiant im hibernate, and i have some problems...

so my problem is:

I have two tables, software and licenses... One software have one or more licenses. ok so far so good.

my problem now is that i have a grid in my jsp file, and i need to put a button in any row, to delete a software, if only this software doesn't have any attributed license. The button is disabled if i can't delete the software, and enabled if i can.

My problem is, how i can do that with hibernate?? How can i know this...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 15, 2007 10:18 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
Your problem has nothing to do with hibernate. With hibernate you will have a one-to-many link between software and licences and in java you will be able to do something like if(software.getLicences().isEmpty()) because licences is a java.util.List or Set.
Hibernate just map your objects to a database, on top of that you will implement your business logic.

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


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

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.