I'm checking JPA layer of FTGO application.
Could you please help me to clarify information on that.
In a number of previously seen applications I've encountered intensive usage of @OneToMany, @ManyToOne, @ManyToMany (also with some following troubles and JPA Exceptions with Cascading problems on saving, especially for @ManyToMany).
In FTGO there are only:
@Embedded (on a single object)
@Embedded @ElementCollection (on a collection)
Questions are:
1) Why there is this difference in annotation usage? Maybe, because @OneToMany/@ManyToOne/@ManyToMany are used on related Entities - and in FTGO there is a concept of Aggregate introduced (central Entity with surrounding Value objects)?
2) Is it possible situation in FTGO when you have to use @OneToMany/@ManyToOne/@ManyToMany as well? Or FTGO JPA layer can live and work with @Embedded annotation only?
Hi Chris,
I'm checking JPA layer of FTGO application. Could you please help me to clarify information on that. In a number of previously seen applications I've encountered intensive usage of @OneToMany, @ManyToOne, @ManyToMany (also with some following troubles and JPA Exceptions with Cascading problems on saving, especially for @ManyToMany).
In FTGO there are only:
Questions are: 1) Why there is this difference in annotation usage? Maybe, because @OneToMany/@ManyToOne/@ManyToMany are used on related Entities - and in FTGO there is a concept of Aggregate introduced (central Entity with surrounding Value objects)? 2) Is it possible situation in FTGO when you have to use @OneToMany/@ManyToOne/@ManyToMany as well? Or FTGO JPA layer can live and work with @Embedded annotation only?
Thanks!