Register / Login
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Object Relational Mapping
keep getting error: More than one row with the given identifier was found: 000001, for class
posted 10 years ago
message: More than one row with the given identifier was found: 000001, for class com.highmark.fm.model.TeamModel
the thing is I want multiple rows with the same primary key returned.....
@NamedQuery(name = "getTeamRoster", query = "select teammdl from TeamModel teammdl where teammdl.teamID = :teamID")
also tried this (saw in another forum somewhere) to no avail...
@NamedQuery(name = "getTeamRoster", query = "select new list (teammdl) from TeamModel teammdl where teammdl.teamID = :teamID")
I also tried using the @ManyToOne above the code, to no avail....here is my sql...(I am returning into a List in my code)...any help is really appreciated
You get good luck from rubbing the belly of a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
Boost this thread!
EJBQL and its return type
Unable to use @NamedQuery in a session bean?
Select an entity object in a NamedQuery
OneToOne Relation Exception