Hi, I’m not sure if I’m doing something wrong, or there is an issue with the current release (14.0-202) of CUBA Studio, but when I create an attribute (either in code, or in the Entity designer, that is based on the current Entity (forming a hierarchical relationship), I get a NullPointerException in Studio as below.
My code looks like this:
@OnDeleteInverse(DeletePolicy.CASCADE)
@OnDelete(DeletePolicy.DENY)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "PARENT_ID")
private MyEntity parent;
public MyEntity getParent() {
return parent;
}
public void setParent(MyEntity parent) {
this.parent = parent;
}
Is this something that I am doing wrong, or an issue with Studio?
Thanks.
java.lang.StackOverflowError
at com.intellij.extapi.psi.StubBasedPsiElementBase.isValid(StubBasedPsiElementBase.java:272)
at com.intellij.psi.impl.smartPointers.SmartPsiElementPointerImpl.getElement(SmartPsiElementPointerImpl.java:91)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:851)
at com.haulmont.studio.backend.util.MetadataUtil.ra(MetadataUtil.java:963)
at com.haulmont.studio.backend.model.EntityPsi.getPsiClass(EntityPsi.java:465)
at com.haulmont.studio.backend.model.EntityPsi.lambda$getFqn$15(EntityPsi.java:309)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:851)
at com.haulmont.studio.backend.util.MetadataUtil.ra(MetadataUtil.java:963)
at com.haulmont.studio.backend.model.EntityPsi.getFqn(EntityPsi.java:309)
at com.haulmont.studio.backend.model.Entity.hashCode(Entity.java:493)
at com.haulmont.studio.backend.model.View.hashCode(View.java:193)
at java.base/java.util.Arrays.hashCode(Arrays.java:4685)
at java.base/java.util.Objects.hash(Objects.java:146)
...