I'm trying to save an entity that has these two fields:
@Temporal(TemporalType.TIMESTAMP)
private Date lastCommentDate;
@Temporal(TemporalType.TIMESTAMP)
private Date lastReplyDate;
But if I only set 1 of the 2 I get an error on the other one:
non-null property lastReplyDate of Systemuser is null; nested exception is
javax.persistence.PersistenceException: non-null property lastReplyDate of
Systemuser is null
stack trace:
org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:311)
org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect.ajc$afterThrowing$org_springframework_orm_jpa_aspectj_JpaExceptionTranslatorAspect$1$18a1ac9(JpaExceptionTranslatorAspect.aj:15)
com.commentous.user.Systemuser.merge(Systemuser.java:181)
com.commentous.web.CommentController.create(CommentController.java:92)
Can I annotate them any differently to allow a null value? I'm going to
have to add some biz logic to set to some zero-date or something if null
and test against that, so I can get past this, but it is very annoying.
thanks!
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine-java/-/DRPVzAj_gUgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.