-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: NHibernate & Object Identity Across Web Services
PostPosted: Tue Sep 20, 2005 12:34 am 
Newbie

Joined: Sat Sep 17, 2005 12:48 am
Posts: 4
Hi,

I have a general question about using Nhibernate across web services. The web service provides basic data manipulation operations and uses NHibernate to do this:

For the sake of example, if I have the following classes:

Code:

// Client class //
public class Client
{
   private int id;
   private State state;
   private Employment employment;

   public Client() {}

   public int Id
   {
      get { return this.id; }
      set { this.id = value; }
   }

   public State ClientState
   {
      get { return this.state; }
      set { this.state = value; }
   }

   public Employment ClientEmployment
   {
      get { return this. employment; }
      set { this. employment = value; }
   }

}


// Employment class //
public class Employment
{
   Private int id;
   Private string occupation;
   private State state;

   public Employment () {}

   public int Id
   {
      get { return this.id; }
      set { this.id = value; }
   }

   public string Occupation
   {
      get { return this.occupation; }
      set { this.occupation = value; }
   }


   public State EmploymentState
   {
      get { return this.state; }
      set { this.state = value; }
   }
}


// State class //
public class State
{
   private int id;
   private string name;

   public State() {}

   public int Id
   {
      get { return this.id; }
      set { this.id = value; }
   }

   public string StateName
   {
      get { return this.name; }
      set { this.name = value; }
   }
}



On the


Top
 Profile  
 
 Post subject: Re: NHibernate & Object Identity Across Web Services
PostPosted: Tue Sep 20, 2005 4:10 am 
Senior
Senior

Joined: Sat May 14, 2005 8:40 am
Posts: 130
akumar wrote:
However both these options seem to be very complicated and I

_________________
Cuyahoga


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.