lwc / moa

Moa - MongoDB object document mapper
4 stars 0 forks source link

Validation across children of ArrayFields #10

Open rexmortus opened 11 years ago

rexmortus commented 11 years ago

It would be rad to get validation on objects like:

screen shot 2013-05-08 at 4 01 35 pm

Is this already possible or am I crazy.

rexmortus commented 11 years ago

Alternatively, 'meta' could be it's own moa document with three fields.

lwc commented 11 years ago

it's possible to define EmbeddedDocumentFields. Embedded fields can extend from DomainObject, or from the base Document if they are not intended to store in their own collection, they can define their own properties and nest indefinitely.

I do like the idea of defining them inline too though.

rexmortus commented 11 years ago

Yeah, I went with embedded documents, which actually works perfectly well for my purposes.

On Thu, May 9, 2013 at 4:51 AM, Luke Cawood notifications@github.comwrote:

it's possible to define EmbeddedDocumentFields. Embedded fields can extend from DomainObject, or from the base Document if they are not intended to store in their own collection, they can define their own properties and nest indefinitely.

I do like the idea of defining them inline too though.

— Reply to this email directly or view it on GitHubhttps://github.com/99designs/moa/issues/10#issuecomment-17626195 .

ALEC SLOMAN Dev Team

E alec.sloman@99designs.com 48 Cambridge St Collingwood 99designs.com

lwc commented 11 years ago

Why are you awake? go back to sleep immediately.