-->
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.  [ 5 posts ] 
Author Message
 Post subject: Generate hibernate.cfg.xml from annotations?
PostPosted: Wed Apr 01, 2009 2:43 pm 
Newbie

Joined: Fri Oct 03, 2008 4:15 pm
Posts: 3
Location: Brazil
Hello!
I have googled and searched (forums, documentation, FAQ, etc) for an answer to my question, but so far, no dice.
I would like to know if it's possible to generate metadata (hibernate.cfg.xml) from my annotation configuration?
I've read this from the FAQ:
Quote:
Where can I see the hbm.xml files generated from the Annotations?
You can't. The annotations are building the internal Hibernate metadata model without any indermediate xml file.

It says I can't see, but isn't there any way to generate the metadata?
I'd like to do that in order to use the cfg.xml as a datasource in iReport so I could build the report pages and see the data as I go along.
Thanks!


Top
 Profile  
 
 Post subject: ireport and annotations
PostPosted: Tue Apr 07, 2009 6:06 pm 
Newbie

Joined: Tue Apr 07, 2009 6:02 pm
Posts: 6
A better solution would be to fix iReport to work with annotations. They bundle an ancient version of hibernate with even the latest iReport - and they set up a simple org.hibernate.cfg.Configuration instead of an org.hibernate.cfg.AnnotationConfiguration - if they just change two lines of code and then fix their ancient version of hibernate you should be able to get it to work.

I submitted a bug to them today. They are using NetBeans projects for their build, and it makes swapping out dependency versions require an act of diety. This is probably why they have had the same old version of hibernate in their stuff for a long time.

if you are handy with NetBeans and know how to make it perform what SHOULD be a 2-second task to fix that - let me know if that works for you.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 08, 2009 12:52 pm 
Newbie

Joined: Fri Oct 03, 2008 4:15 pm
Posts: 3
Location: Brazil
I decided to work with a different approach. If I had the time (@work right now then I'm off to my parents' to spend easter break) I'd look into what you said ryangardner.
Thx anyway!

_________________
---------------------------------------------------------
For what shall it profit a man, if he shall gain the whole world, and lose his own soul?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 09, 2009 10:39 am 
Newbie

Joined: Tue Apr 07, 2009 6:02 pm
Posts: 6
jonathanw wrote:
I decided to work with a different approach. If I had the time (@work right now then I'm off to my parents' to spend easter break) I'd look into what you said ryangardner.
Thx anyway!


I've been working with the lead developer on iReport - he's been putting work into getting annotations to work properly.

http://jasperforge.org/plugins/espforum ... icid=54839


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 10, 2009 6:19 pm 
Newbie

Joined: Fri Oct 03, 2008 4:15 pm
Posts: 3
Location: Brazil
Neat, going from old version to Hibernate 3.4.0 and annotations support. Good news indeed.

_________________
---------------------------------------------------------
For what shall it profit a man, if he shall gain the whole world, and lose his own soul?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.