Quarkus 3 + Hibernate 6 error on packages

239 views Asked by At

I updated my Project to Quarkus 3 and I am getting this error

Association 'com.step.trackactions.model.PlatformActionLeadEntity.company' targets an unknown entity named 'com.step.common.model.Company'

PlatformActionLeadEntity is made like this

@Entity
@Table(name = "PlatformAction")
@RegisterForReflection
public class PlatformActionLeadEntity{

    private Customer customer;

    private Company company;

}

and both Company and Customer are tagged as entity

@Entity
@MappedSuperclass
@Table(name = "Company")
@RegisterForReflection
public class Company extends PanacheEntityBase implements Cloneable { ... }
@Entity
@MappedSuperclass
@Table(name = "Customer")
@RegisterForReflection
public class Customer extends PanacheEntityBase implements Cloneable { ... }

the point is that

  • com.step.trackactions.model.PlatformActionLeadEntity is inside the project
  • com.step.common.model.Company is in an external library imported in the project

and in application.properties I added

quarkus.hibernate-orm.packages=com.step

but it dies not work, with the old version of quarkus he used to work :(

1

There are 1 answers

0
Lorenzo De Francesco On BEST ANSWER

I found the problem, it is the annotation @MappedSuperclass. You cannot annotate a class with @Entity and @MappedSuperclass