Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA merging not all entities

 
Enrico Morelli
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

I don't understand the merge use. I've a USER table with firstname, lastname, email and password entities. So I want to create different JSF pages to modify separately password and the other data.
But I cannot, because when I try to submit the JSF form with user data modification I receive the error:

Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: Column 'PASSWORD' cannot accept a NULL value.
Error Code: -1
Call: UPDATE LOCALUSER SET LASTNAME = ?, PASSWORD = ? WHERE (EMAIL = ?)
bind => [3 parameters bound]


This is the JSF:


and this is the EJB:




Is it possible to update only few entities?

Thanks
 
Enrico Morelli
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the moment I solved in this mode.

For the password:




And for the other user data:





I don't know if it's correct, but works. :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic