Hibernate version:
3.2 GA
Mapping documents:
http://www.hibernate.org/hib_docs/annot ... ml_single/
Code between sessionFactory.openSession() and session.close():
N/A
Full stack trace of any exception that occurs:
DuplicateMappingException: Duplicate collection role mapping
Name and version of the database you are using:
N/A ((Bootstrap error)
The generated SQL (show_sql=true):
N/A (Bootstrap error)
Debug level Hibernate log excerpt:
Folks,
I am getting the error Duplicate collection role mapping, an exeption that is being thrown during the boostrap process. (DuplicateMappingException).
I have searched all the forums and mailing lists to no avail on this problem. The closest I could find on this error was actually a duplication of mapping on hibernate, which is not my case.
Here is how it happens.
I have a class in a project that runs by itself, and the following annotations:
@Entity
@Table(name="TABLE_A")
@MappedSuperClass
Class Base
{
Clollection<? extends Foo> someCollection;
@OneToMany(targetEntity=Foo.class)
public Collection<? extends Foo> getCollection() {...}
public void setCollection(Collection<? extends Foo> c) {...}
}
===== On anther level, I have
@Entity
@Table(name="TABLE_A")
@AttributeOverride(name = "someCollection", column = @Column(name = "FOO_ID"))
Class Other extends Base
{
@OneToMany(targetEntity=AFoo.class)
@Override
public Collection<? extends Foo> getSomeCollection() {...}
public void setSomeCollection(Collection<? extends Foo> c) {...}
}
On hinernate.cfg.xml, ther e is only one entry mapping for Other.class and one for AFoo.class
I am not sure why I am getting the duplicate mapping.
Any help is greatly appreciated.
Thank you in advance,
Harringf