This exception occures when you have more then one @Entity with the same class's name or explicit name.
To fix the issue you have to set different explicit names for each entity.
Example of error case:
package A;
@Entity
class Cell{
...
}
package B;
@Entity
class Cell{
...
}
Solution example:
package A;
@Entity(name="a.Cell")
class Cell{
...
}
package B;
@Entity(name="b.Cell")
class Cell{
...
}
So, to use them in HQL you have to write
...createQuery("from a.Cell")...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…