We didn't understand what u want.
  What do u mean 'im trying to map this employee to User.'?

Ice-Man

2008/12/20 Rajesh.SriRamoju <rajesh.sriram...@gmail.com>

>
> Hi
>
>  Please Help me out here
>
> What Iam trying to do is one-to-one Mapping in Appfuse2 Struts type
> Steps that I did
> I have an Employee model
> and im trying to map this employee to User.
> I have created in User as follows
> ---
> -------
>  Private Employee employee;
>  @OneToOne(cascade=CascadeType.All)
>    @JoinColumn(name="Fk_Employee_Id",referencedColumnName="Pk_Employee_id")
>    public Employee getEmployee {
>        return employee;
>    }
>
>    public void setEmployee(Employee employee {
>        this.employee = employee;
>    }
> ----
> ----------------
>
>
> in the UserForm page  I have added as follows
>
> <s:textfield key="user.employee.id" cssClass="text large"
> required="true"/>
>
> when i open the userForm and try to add new record the record is saving
> fine
> and it shows user object as saved successfully but the value which i
> entered
> in the employee  feild was not saving in the database.
> Iam unable to figure it out.
> Please Help me whether iam missing any thing
> or
> Please Can you send me an example for One-to-One Mapping .
> Thanks For ur help in advance
>
> Regards
> RajeshSr
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Appfuse2-struts-type--One-to-One-Mapping--Problem-tp21104892s2369p21104892.html
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
> For additional commands, e-mail: users-h...@appfuse.dev.java.net
>
>

Reply via email to