Author: CyrexCore2k | Posted on: 12/30/2008 1:01:29 AM | Views : 282

Alright so after a bit of research I think I'm having some trouble coming up with a suitable ORM pattern.Here's the situation. I have the following tables and relevant fields:EVENTSeventidcreatoridimageidINVITATIONinvitationiduserideventidIMAGESimageidUSERSuseridimageidAside from the more obvious relationships creatorid -> USERS.useridI felt pretty early on that if I wanted to retrieve the relevant data for a specific object from the database the best way to do that would be in a single query rather than grabbing the IDs of subsequent objects and sending another query. In the example above, gathering the relevant information for a single invitation would require 7 queries!So I started grabbing as much data as I could but as you can see, the field names will undoubtedly begin to collide since I'm grabbing multiple users and images. I could re-n ...

Go to the complete details ...