I believe your TravelAgent object needs a @Column named "t_agent_id".
Matt
On Thu, Oct 30, 2008 at 12:03 AM, Greenhorn2005 <[EMAIL PROTECTED]> wrote:
>
> Hello Matt,
>
> here is the code of user model....
>
> public class User extends BaseObject implements Serializable, UserDetails {
> private static final long serialVersionUID = 3832626162173359411L;
>
> private Long id;
> .................................
> private boolean credentialsExpired;
> private HotelGroup hotelGroup;
> private TravelAgent travelAgent;
>
> @ManyToOne(targetEntity = HotelGroup.class)
> @JoinColumn(name = "h_group_id")
> public HotelGroup getHotelGroup() {
> return hotelGroup;
> }
>
> @ManyToOne(targetEntity = TravelAgent.class)
> @JoinColumn(name = "t_agent_id", nullable = true)
> public TravelAgent getTravelAgent() {
> return travelAgent;
> }
>
> public void setTravelAgent(TravelAgent travelAgent) {
> this.travelAgent = travelAgent;
> }
>
> public void setHotelGroup(HotelGroup hotelGroup) {
> this.hotelGroup = hotelGroup;
> }
>
>
> .............
> }
>
>
> In TravelAgent model...................
>
> @Entity
> @Table(name="travel_agent")
> public class TravelAgent {
>
> private Long id;
> .......................
> private Set<HotelGroup> hotelGroups ;
> private List<User> userList;
>
> ......................
> @ManyToMany(mappedBy = "travelAgents", fetch = FetchType.EAGER)
> public Set <HotelGroup> getHotelGroups() {
> return hotelGroups;
> }
> ...............
>
> Matt, hope everything is clear now.............
>
> thank you
>
> GreenHorn...
> --
> View this message in context:
> http://www.nabble.com/Error-after-modifying-and-adding-User-model-tp20204246s2369p20241352.html
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]