What have you done with UDAs?
via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 23 02:09:38 PDT 2015
I use them in a simple MongoDB-based ORM, not (yet?) publically
available. Usage is like this:
@Collection("my.model")
struct MyModel {
@Field @Required @Index
BsonObjectID foreignKey;
@Field
string someOptionalString;
@Field @Required
int[] someRequiredArray;
@Field @Validate!(a => a % 2 != 0)
int onlyOddIntegers;
@Field @ValidEmail
string email;
mixin ORM;
}
More information about the Digitalmars-d
mailing list