views:

295

answers:

0

I have two entities(actually more but it doenst matter)

Exam and Exam_Normals

Its a oneToMany relationship... The problem is that i need a primary key for Exams_Normals PK (Exam_ID Item) Item should be 1 2 3 4 5 etc.... But cant achieve it getting errors

An alternative would be to: I cound use an IDENTITY and a ManyToOne relationship at Exam_Normals but that should be like PK(Exam_Normals_ID) and a reference to Exam and an extra collumn Item to keep an order.. SO 3 collumns

But to avoid the alternative tried I tried with @IdClass and got errors Tried @EmbeddedID everything nothing works

Any idea??