-
Notifications
You must be signed in to change notification settings - Fork 8
Lookup on Update
Geoffrey Wiseman edited this page May 23, 2014
·
3 revisions
In some cases, you won't want to update a nested object, but rather look it up.
For instance, when you receive a new dto of a note with an author attached, you might not want any changes contained within the author dto to get persisted -- you're persisting the note, but you're only looking up the author.
@Access(AccessMode.FIELD)
public class Note {
private String title;
private String body;
@Property(translation="userDao.get(this.?author.id)")
private User author;
}
This style of lookup relies on using External Objects in Translation and Source Expressions.
- Five Minute Introduction
- Getting Moo
- Translating Object Properties
- Translating Collection Properties
- Translating Map Properties
- Source Expressions
- Access Modes
- Translating to Value Types
- Extensions
- External Objects in Translation
- Ignoring Properties
- Updating Collections
- Translation Target Factories
- Nested Updates
- Optional and Required Properties
- Order of Property Translation
- Constructors
- Lookup on Update
- Caching
Releases
Background