I am trying to generate SQL to form part of a trigger definition.
Given the following array:

[
  Post.title, # Property
  Post.author.name # Query::Path
]

I'm trying to get something like:

SELECT posts.title, authors.name FROM posts INNER JOIN authors ON posts.author_id = posts.id

There is enough information in the array to construct that SQL (via the .relationships property of Path), but it feels like I would be duplicating some part of DM by writing query generation myself, especially calculating the joins.

I'm not sure which part of the code to look though, can anyone point me in the right direction?

Cheers,
Xavier

--
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to