-->
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 with multiples table
PostPosted: Mon Nov 19, 2007 7:30 pm 
Newbie

Joined: Mon Nov 19, 2007 7:23 pm
Posts: 2
Location: Ecuador
How make the query in hibernet. help me please:

SELECT c.contacts_members_id, m.dname, p.nick, p.status_connection, p.location, p.member_type
FROM contacts c, invitation_contacts i, members m, profiles p
WHERE (
c.contacts_members_id = i.members_id AND
c.member_id = i.invitation_contacts_members_id AND
i.accepted = 'TRUE' AND
c.contacts_members_id = m.id AND
p.member_id=m.id AND
c.member_id = 284
)
OR
(
c.member_id = i.members_id AND
c.contacts_members_id = i.invitation_contacts_members_id AND
i.accepted = 'TRUE' AND
c.contacts_members_id = m.id AND
p.member_id=m.id AND
c.member_id = 284
)
ORDER BY p.member_type DESC, i.updated_at


Top
 Profile  
 
 Post subject: Re: select with multiples table
PostPosted: Tue Nov 20, 2007 10:50 am 
Newbie

Joined: Mon Nov 19, 2007 7:23 pm
Posts: 2
Location: Ecuador
ncaldas wrote:
How make the query in hibernate. help me please:

SELECT c.contacts_members_id, m.dname, p.nick, p.status_connection, p.location, p.member_type
FROM contacts c, invitation_contacts i, members m, profiles p
WHERE (
c.contacts_members_id = i.members_id AND
c.member_id = i.invitation_contacts_members_id AND
i.accepted = 'TRUE' AND
c.contacts_members_id = m.id AND
p.member_id=m.id AND
c.member_id = 284
)
OR
(
c.member_id = i.members_id AND
c.contacts_members_id = i.invitation_contacts_members_id AND
i.accepted = 'TRUE' AND
c.contacts_members_id = m.id AND
p.member_id=m.id AND
c.member_id = 284
)
ORDER BY p.member_type DESC, i.updated_at


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.