Groups
Groups
Sign in
Groups
Groups
Play Framework [deprecated]
Conversations
About
Send feedback
Help
[2.0] Anorm: Join query and parsers
138 views
Skip to first unread message
Pablo Fernandez
unread,
Nov 19, 2012, 4:39:27 PM
11/19/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to play-fr...@googlegroups.com
Can anyone point me to an example of how to perform a join sql query using 2 parsers? e.g:
* User has N Tasks
* Task db table has user_id
* The result should be a User with a tasks: Set[Task] field
Thanks
Guillaume Bort
unread,
Nov 19, 2012, 4:50:11 PM
11/19/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to play-fr...@googlegroups.com, play-fr...@googlegroups.com
Start parsing the resultset as a Seq[User~Task] and then use the groupBy operation of the collection API to resolve it as Map[User,Task]
--
Pablo Fernandez
unread,
Nov 19, 2012, 4:58:04 PM
11/19/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to play-fr...@googlegroups.com
Isn't there a code example somewhere? seems like a common enough case not to be included with the play documentation
Reply all
Reply to author
Forward
0 new messages