Skip to content

Instantly share code, notes, and snippets.

@dotkebi
Last active April 12, 2016 01:34
Show Gist options
  • Save dotkebi/4f68e346dd20502fe79f5c1f72848318 to your computer and use it in GitHub Desktop.
Save dotkebi/4f68e346dd20502fe79f5c1f72848318 to your computer and use it in GitHub Desktop.
sample class
@DatabaseTable()
public class SomeEntity() {
@ForeignCollectionField()
private Collection<DetailEntity> detailEntities = new HashSet<>();
}
@DatabaseTable()
public class DetailEntity() {
@DatabaseField(foreign = true, foreignAutoRefresh = true)
private SomeEntity someEntity = new SomeEntity();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment