-->
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.  [ 4 posts ] 
Author Message
 Post subject: Generator for Mapping Files & Classes
PostPosted: Thu Mar 23, 2006 3:06 pm 
Newbie

Joined: Thu Mar 23, 2006 2:55 pm
Posts: 1
Hi,
though I suppose it's a very common subject I couldn't find any post on this so if you've seen another post that answers my question please send me the link!
Thing is my company is considering using NHibernate as the ORM for a new project but I couldn't find any code generator without bugs and with all the features that other code generators (like LLBLGen) provide. I've already tried:
- Simon Green's templates for Codesmith
- a few templates for MyGeneration (Template Object Mapping 1.1 and OM 0.7.3)
-Codus.
None of these have generated a valid class/mapping file for the pubs DB on SQL Server 200 (I've added the PK where needed). I'll appreciate any help on the subject since I assume that developing a new template would be very difficult and could take a very long time to develop.

Thanks
Diego Marcet


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 23, 2006 5:21 pm 
Expert
Expert

Joined: Fri May 13, 2005 11:13 am
Posts: 292
Location: Rochester, NY
Diego,

The lack of code-generation in NHibernate is viewed as an important feature by the majority of its user-base. AFAIK, all the NH code-generation tools out there only get you "templates" to get you started, but using NH requires at least some ability/willingness to tweak mapping files/domain objects at the code level.

If you'd prefer a graphical tool for working with mapping files, I think Ayende Rahien has something (though I don't use it). Still, you'll have to be familiar with the mapping functions and limitations on some level.

If a completely code-generated DAO layer is a part of your project requirements, or just very important for you, there are many tools that will work better for you (LLBLGen, TierDeveloper, etc., etc.). You might want to do a little more research on the tool space, see if something is a better fit for you or your project.

** Disclaimer **

I'm not really a spokesman for NH, but I think this is an accurate representation.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 29, 2006 7:23 am 
Newbie

Joined: Wed Mar 29, 2006 5:04 am
Posts: 9
Location: Antwerp, Belgium
I use MatsSoft ObjectMapper, which is now part of the Puzzle.NET-project.
Generates the xml-mapping file and all classes I need.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 29, 2006 7:55 am 
Beginner
Beginner

Joined: Tue Mar 28, 2006 3:44 am
Posts: 22
As mvanwesemael mentioned I use OjectMapper too. It's definitively worth a look.

You should keep in mind that those tools give you a nice start, but some changes have to be applied manually. Like marcal mentioned most tools give you "just" templates, which furthermore need some tweaks.
I have tried a few open source/free tools and my conclusion so far is that ObjectMapper is the most complete one. Give it a try. :)

Greetings,
Chavez


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