I was getting this error when using session.createSQLQuery():
"More than one row with the given identifier was found."
No searching on the interwebs helped at all.
I have an entity that looks like this:
@Entity
public class Pornstar
{
@OneToOne(optional=true)
@JoinColumn
PornstarArea area;
public PornstarArea getArea() { return this.area; }
public void setArea(PornstarArea area) { this.area = area; }
}
PornstarArea is another entity object.
I randomly removed the @JoinColumn and it made that error stop happening. Go figure.

0 comments:
Post a Comment