-->
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: @id automatically transient? serialization problem
PostPosted: Thu Nov 08, 2007 7:38 pm 
Newbie

Joined: Thu Nov 08, 2007 7:28 pm
Posts: 2
Hi there!

i have a client/server application. the whole persistence stuff is on the server side. objects are streamed to a client with object serialization over an ObjectOutputStream / ObjectInputStream.

the problem:

when i stream an object which i just fetched from the database over hibernate, the client doesn't receive the id of the object. i did some debug stuff, and i'm absolutely sure that on the server side, just before streaming the object, the id is there. but just after arriving at the client, the id is null. does the @id annotation somehow make the id attribute transient?


i read most of the manuals, googled a lot. but i couldn't find an answer. i'd really appreciate your help.

thanks in advance

commy


Hibernate version:
Hibernate 3.2
Hibernate Annotations 3.3.0

Mapping documents:

only the id relevant parts and the entity annotations of the class without any comments:

Code:

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class Persistable implements IPersistable {

   private String   id;

   public Persistable() {

   }


   @Id
   public String getId() {
      return this.id;
   }

//[...]



Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 08, 2007 7:47 pm 
Newbie

Joined: Thu Nov 08, 2007 7:28 pm
Posts: 2
Hi again!

i forgot to say - although i think it's not relevant - i use the java uuid generator to generate the id of an object. i do it in my application on my own, hibernate has nothing to do with id generation.

commy


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.