We use Hibernate as the provider of our JPA functionality.
But we also use the extra functionality that Hibernate provides above and beyond the spec.
At the moment, IDEA is reporting some Persistence Model warnings related to this functionality.
Is there any way to get IDEA to stop complaining when we use these extra features, but still do basic model validation?
The warning that IDEA complains about, but which is valid under Hibernate:
- '@javax.persistence.ManyToOne' attribute cannot be used in Embeddable object
This is allowed under Hibernate, just not by the JPA spec.
Another problem is with the following warning:
- '@org.hibernate.annotations.CollectionOfElements' attribute type should be an Embeddable
The element type of the collection property is actually declared embaddable, I'm not sure why IDEA is saying it's not.
The warnings both come from the inspection: Inspections\Java EE Issues\Persistence Model Errors
It would be nice if this inspection was a bit more configurable (like the "Declaration has Javadoc problems" inspection which is fully customizable).