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