On Sun, 22 Nov 2015 11:17:38 +0100 "Eric Chatellier" <chatellier@codelutin.com> wrote:
Hi,
Hi Éric,
I would like to generate complex annotations with eugene, like the following code:
@NotNull @OneToMany(mappedBy = "id.pk1", fetch = FetchType.LAZY, orphanRemoval = true) @Cascade({ CascadeType.SAVE_UPDATE }) private List<Entity1> entities1;
@NotNull @OneToMany(mappedBy = "id.pk1", fetch = FetchType.LAZY) private List<Entity2> entities2;
@NotNull @ManyToMany(fetch = FetchType.LAZY) @Cascade({ CascadeType.SAVE_UPDATE }) @ContainedIn private List<Entity3> entities3;
@OneToMany(fetch = FetchType.EAGER, orphanRemoval = true) @JoinColumn(name = "entity5") @Cascade({ CascadeType.SAVE_UPDATE }) // see HHH-1718 @Fetch(value = FetchMode.SUBSELECT) private List<Entity4> entities4;
Is there a simple way to perform this ?
Have a look to the class org.nuiton.eugene.java.extension.ObjectModelAnnotation I think that we are quite close to this. Let me know if you need some help once you had a look to the code. Cheers, tony. -- Tony Chemit -------------------- tél: +33 (0) 2 40 50 29 28 http://www.codelutin.com email: chemit@codelutin.com twitter: https://twitter.com/tchemit