-->
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.  [ 1 post ] 
Author Message
 Post subject: Configuring Hibernate 3 using Java Objects.
PostPosted: Mon Dec 15, 2008 7:45 pm 
Newbie

Joined: Thu Nov 13, 2008 1:46 am
Posts: 6
I am attempting to use the Configuration and Mappings object

in a Java class so that I don't use hibernate.cfg.xml and Object.hbm.xml

files. I want the contents in memory from Java code, not the XML files.

Ie. I DO want to hard code everything.

I know about what the tutorial says at

http://www.hibernate.org/hib_docs/v3/re ... ogrammatic

however, it doesn't explain how to program the equivalent of both files.

I see how to program an Hibernate.cfg.xml.

Could someone kindly advise/point me in the right direction

for programming of an Object.hbm.xml in java code?

In other terms, how do I successfully relate in what

one sees, in, say:

//*********************************************************88
- <hibernate-mapping>
- <class name="events.Person" table="PERSON">
- <id name="id" column="PERSON_ID">
<generator class="native" />
</id>
<property name="age" />
<property name="firstname" />
<property name="lastname" />
</class>
</hibernate-mapping>
//*********************************************************88

by programming with the Mappings class, and any other(s)?


Happy new Year!

:)


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

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.