|
|
|
I've got the same issue. I have some fields which have an @Id OR and @Column (not both of them), and I also get this error. I'm using 8M1 btw.
Most likely, the problem is project-configuration-related.
I need to know the structure of your projects. Modules/Dependencies/Facets/Descriptors It would. Plus I need to know how many XMLs refer to the class with "more than one.." directly (mapping XML) or indirectly (hibernate or spring config with annotatedPackages attribute etc.).
Hi,
I've attached my project files as requested. We have no mapping XMLs except 'persistence.xml' which specifies all our entities. All our entities use @Entity annotations, and are listed in our persistence.xml file. In addition, all our entities extend a common base class ("AbstractEntity" or "AbstractVersionedEntity" which extends the former) which provide the @Id and @Version attributes. These properties have both a @Id/@Version and @Column annotations. Here is a snippet: @Version
@Column( name = "VERSION", nullable = false )
public Integer getVersion() {
return version;
}
I've tried to reproduce the situation in a small project with no luck.
There are 2 JPA facets in 2 independent modules and this seems to be perfectly Ok. Are there any duplications in your persistence.xml's? I am seeing this as well... IDEA-18993 ... Could the next EAP release be instrumented to provide more debugging information?
I am using Hibernate with Spring. My entities are defined in my hibernate configuration ONLY. If I comment an entity from the hibernate configuration, it looses all of the JPA markup in the right gutter (aka, what it looks like when there is no Hibernate facet active). I am still seeing this in 8792.
Anything that can be done to help diagnose? It will really help if you attach a small self-contained project just to reproduce the problem.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The same happens when you have @Id and @Column (which is also a valid use-case).