I'm starting a new application I was hoping to start using Hibernate on.
Sure enough, the first object I need to map is a "Narrow View" I'm creating
for a list. It needs to join four tables (2 are the same table).
The SQL would look something like this:
select recipient.firstname, recipient.lastname, message.date,
message.subject, sender.firstname, sender.lastname
from message, user sender, message_box, user receipient
where recipient.userid = ?
and message_box.userid = recipient.userid
and message_box.type = 1
and message.id = message_box.message_id
and sender.id = message.senderid;
I'd like the results to map to:
class MessageListView {
Name recipientName;
Date date;
String subject;
Name senderName;
}
What would be involved in adding support for this in Hibernate? I don't
need update capablities (at least not yet :) ).
Thanks,
John
-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing
real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim
_______________________________________________
Hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel