Skip to content
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.