ComposeOne: must always exist?

5 views
Skip to first unread message

Alex Hudson

unread,
Feb 23, 2011, 6:05:17 AM2/23/11
to Morph for MongoDB
Hi all,

First off, I sent some patches for bugs I'd found and noticed that
they'd been merged a little while ago - thanks a lot for that :) I'm
going to go through my local copy here because I think I may have a
few other little fixes that I'll stick up on issues.

My question is about ComposeOne. At the moment, it seems that if I
have that property on an object, the Morph framework expects that the
composed object must exist - otherwise, the object cannot be saved.

I'm thinking this is wrong; it ought to behave like HasOne in that it
may or may not have this sub-object. It's also slightly different to
ComposeMany, because that could hold zero sub-objects (although
obviously the collection would probably exist).

Is this a deliberate design decision?

Thanks

Alex.
Reply all
Reply to author
Forward
0 new messages