title: What is the correct approach to using GWT with persistent objects?
body: <p>I am currently working on a simple web application through Google App engine using GWT. It should be noted that this is my first attempt at such a task. </p>
  
  <p>I have run into to following problem/dilema:</p>
  
  <p>I have a simple Class (getters/setters and nothing more. For the sake of clarity I will refer to this Class as <code>DataHolder</code>) and I want to make it persistent. To do so I have used <code>JDO</code> which required me to add some annotations and more specifically add a <code>Key</code> field to be used as the primary key.</p>
  
  <p>The problem is that using the <code>Key</code> class requires me to import <code>com.google.appengine.api.datastore.Key</code> which is ok on the server side, but then I can't use <code>DataHolder</code> on the client side, because <code>GWT</code> doesn't allow it (as far as I know).</p>
  
  <p>So I have created a sister Class <code>ClientDataHolder</code> which is almost identical, though it doesn't have all the <code>JDO</code> annotations nor the <code>Key</code> field. </p>
  
  <p>Now this actually works but It feels like I'm doing something wrong. Using this approach would require maintaining two separate classes for each entity I wish to have.</p>
  
  <p>So my question is: Is there a better way of doing this?</p>
  
  <p>Thank you.</p>