3 Replies Latest reply on Jun 24, 2006 2:06 PM by Gavin King

    OneToOne and EL (Error during model data update.)

    Conny Lundgren Newbie

      Im trying to make a simple page in seam, and i got a OneToOne in my pojos like this

      Event 1 -- 1 EventDetail

      The pojos are mapped

      public class Event implements Serializable {
       private Long eventId;
       public Long getEventId() {
       return eventId;
       public EventDetail getEventDetail() {
       return eventDetail;
      .. more getters/setters

      public class EventDetail implements Serializable {
       private Long eventDetailId;
       private int cost;
       public Long getEventDetailId() {
       return eventDetailId;
       public int getCost() {
       return cost;
      ..more getters/setters

      And my view
       <h:inputText id="username" value="#{event.name}" required="true"/>
       <h:inputText id="name" value="#{event.description}" required="true"/>
       <h:inputText id="cost" value="#{event.eventDetail.cost}"/>

      Submitting this page gives the following error ""cost": Error during model data update."

      Removing the event.eventDetail.cost saves the entity, I have tuned up the logging to debug but it doesn't give me any meaningfull error.

      Any suggestion on this really trivial problem?