• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

make a entity class rows read-only in JPA

 
Pradyut Bhattacharya
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I m able to get values using JPA when i have only mapped one table

Now when i have gone for mapping related tables i get the error



I m using [EclipseLink-0] (Eclipse Persistence Services - 2.0.1.v20100213-r6600)

In one of the child tables i have this code



What changes i have to do in this code to make the fields read-only

or are there any better workaround for not making these fields read only

Thanks

Pradyut

India
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are using the same foreign key field in both ManyToOne's, this makes no sense. You must use different foreign key fields for each relationship.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic