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 

  | @Entity
  | @Name("event")
  | @Scope(SESSION)
  | public class Event implements Serializable {
  | 
  |     private Long eventId;
  | 
  |     @Id
  |     @GeneratedValue
  |     public Long getEventId() {
  |             return eventId;
  |     }
  | 
  |        @OneToOne
  |     public EventDetail getEventDetail() {
  |             return eventDetail;
  |     }
  | .. more getters/setters
  | }   
  | 


  | @Entity
  | @Name("eventDetail")
  | public class EventDetail implements Serializable {
  | 
  |     private Long eventDetailId;
  |     private int cost;
  |     @Id
  |     @GeneratedValue
  |     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?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953221#3953221

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953221

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to