Great. When it is out I'm going to change my code to see how it works.
This time I noticed the use of joins in most cases of non optional many-to-one associations, as expected. The few cases that didn't work involves the use of composite keys or multiple levels with composite keys. I'm still not sure what is the trigger. Anyways they rare and probably examples of bad entity design from my part. Thank you.
Hi, So, in which conditions the relation between two entities will be fetched as a plain join instead of a left join? I'm asking because I think the code bellow is the simplest possible case and still it doesn't work. public class Entity { @Id private long id; @ManyToOne(optional=false) @JoinColumn(name="...") private EntityA ea;
Hi, So, in which conditions the relation between two entities will be fetched as a plain join instead of a left join? I'm asking because I think the code bellow is the simplest possible case and it still doesn't work. public class Entity { @Id private long id; @ManyToOne(optional=false) @JoinColumn(name="...") private EntityA ea;
Hi, I updated to 7.2.3 today and I'm still getting only left joins. One of my entities is like: public class Entity { @Id @Column(name="ID") private long id; @ManyToOne(optional=false) @JoinColumn(name="...") @ReferenceView("...") @ReadOnly private EntityA ea; @ManyToOne(optional=false) @JoinColumn(name="...") @ReferenceView("simple") @ReadOnly private EntityB eb; @ManyToOne @JoinColumn(name="...") @ReadOnly @ReferenceView("simple") private EntityC ec; @ManyToOne(optional=false) @JoinColumn(name="...")...
Hi, I updated to 7.2.3 today and I'm still getting only left joins. One of my entities is like: public class EntityA { @Id @Column(name="ID") private long id; @ManyToOne(optional=false) @JoinColumn(name="...") @ReferenceView("...") @ReadOnly private EntityA ea; @ManyToOne(optional=false) @JoinColumn(name="...") @ReferenceView("simple") @ReadOnly private EntityB eb; @ManyToOne @JoinColumn(name="...") @ReadOnly @ReferenceView("simple") private EntityC ec; @ManyToOne(optional=false) @JoinColumn(name="...")...
Don't know if this is by design, but I noticed the @Condition doesn't work for @ManyToMany collections. I tried many conditions e.g. "${property} is not null", "e.property is not null", "1=1", but the generated SQL doesn't change. Which is not the case when I use @OrderBy("property"). I tested this in a very basic test case which is attached.
Thank you. It worked. I had already tested @EditAction("") in conjunction with @ViewAction("") but it didn't work at the time. Now I get it was because of the @NoModify that I was using too.