Hi,
I have a Person and Address entity. I need to define custom queries for the update and delete operations of these entities. I wrote a DescriptorCustomizer for each and linked it to my entities by means of the @Customizer annotation. So far so good, upon application startup both customizers are called and queries are successfully customized. But... once I define a relationship from Person to Address (@OneToOne) only the customizer for Address is invoked. Even worse, when I make the relationship bi-directional no customizers are invoked? Who can help me? Below some code snippets
Person
@Entity
@Table(name="JASPER.PERSON")
@Customizer(be.jasper.temptable.persistence.PersonTempTableQueryDescriptorCustomizer.class)
public class Person{
...
@OneToOne
@JoinColumn(name="ADDRESS_ID")
private Address address;
...
Address
@Entity
@Table(name="JASPER.ADDRESS")
@Customizer(be.jasper.temptable.persistence.AddressTempTableQueryDescriptorCustomizer.class)
public class Address {
...
@OneToOne(mappedBy="address")
private Person person;
...
public class PersonTempTableQueryDescriptorCustomizer implements DescriptorCustomizer {
public void customize(ClassDescriptor descriptor) throws Exception {
...
similar for AddressTempTableQueryDescriptorCustomizer