-->
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: Adding additional fields to the POJO
PostPosted: Thu Sep 30, 2004 1:51 pm 
Beginner
Beginner

Joined: Thu Sep 30, 2004 4:17 am
Posts: 21
Hibernate version:
2.1.4

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


I have a POJO that is mapped to a database table. I am passing this POJO from the EJB layer to the web-tier. The web-tier updates the POJO model object and sends it back to the EJB to persist. Everything works fine until this.

Now, the web-tier needs to put some *extra* information into the POJO model object. For this, I need additional fields in my POJO. Can I add additional fields to my POJO class without affecting Hibernate?

Any help is appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 30, 2004 1:54 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
of course you can add calculated/non persistent business fields in the pojo... what is the problem? these fields won't be declared in the mapping file... that's all
Read about "transcient" declaration

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


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.