Option use with collections?

Skip to first unread message

Matt Duncan

Jul 14, 2014, 10:58:53 AM7/14/14
to mapp...@googlegroups.com

Some of my objects have Collections as properties(List or Set) but I’d like to be Option[List[MyObject]] because the object may or may not have any associated objects.

I can’t seem to map this relationship though EX

val gameProfiles = onetomany(UserPlatformProfileEntity) option (_.gameProfiles)

Is there a way around this or am I doing it wrong?


Jul 14, 2014, 12:58:11 PM7/14/14
to mapp...@googlegroups.com
Hi, when are you expecting a None and when a Nil?

Sent on the move
You received this message because you are subscribed to the Google Groups "mapperdao" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapperdao+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
0 new messages