- edited description
annotations for meta setup
Issue #2
resolved
@mapClass("models.todo")
class Todo {
@mapId()
id: string;
@map("models.task")
tasks: Task[];
@map()
owner: Person;
@map()
created: Date;
@map()
description: string;
misc: string; //ignored as there is no annotation.
}
class TodoSetup implements Setup {
configure(builder: Builder): void {
builder.addType(Todo);
}
}
notes:
- should minimise magic strings
- the array, should convert into .addProperty("tasks", "models.task[]")
- the owner, should convter to .addProperty("owner", "models.Person")
Comments (2)
-
reporter -
reporter - changed status to resolved
added initial support for annotating classes
- Log in to comment