Micronaut-data error after upgrade 3.9 -> 4.3: "No inverse property found for reference of type ... and reference: defaultReference"

26 views Asked by At

After upgrading micronaut from 3.9.4 to 4.3.7 and fixing all the javax related errors, i still have three errors of the type: "No inverse property found for reference of type name....Ugruppe and reference: defaultReference" with code like:

    @JsonManagedReference
    @Relation(value = Relation.Kind.MANY_TO_ONE)
    @MappedProperty(value = "ugruppe_id")
    private Ugruppe ugruppe;

Ugruppe is derived from IdSjKrzl which is derived from IdSj which is derived from IDData:

public class IDData {
    @Id
    @GeneratedValue
    @Relation(value = Relation.Kind.ONE_TO_MANY)
    @MappedProperty("id")
    @Builder.Default protected Long id = 1l;

With Micronaut 3.9.4 I did not have that error message.

After further search the problems seems not to be related to classes extending classes. I flattend the structure and the problem remained.

I do not understand the error message. What is the "inverse property", if not the id in the referenced class? An what is the "defaultReference".


The solution was to remove the annotation '@JsonManagedReference' . After that the errors where gone.

With regards

0

There are 0 answers