-->
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: NHQG how to get it working
PostPosted: Mon Mar 17, 2008 4:10 pm 
Newbie

Joined: Fri Mar 14, 2008 3:01 pm
Posts: 8
Location: Marysville, PA
I testing NHibenate and have a simple console app with 1 embedded mapping. I want to use NHQG to generate strongly typed criteria. I have found snippets online about modifing the project file, and using a custom tool.

so far none of these options seem to work.
If I use the custom tool with with a name of NHibernateQueryGenerator the build tells me it cannot find the tool.
If I modify my project file it warns me I cannot include the file Foo.hbm.xml twice. (once as embedded resource, once as part of HbmFiles)
[code]<ItemGroup>
<HbmFiles Include="Domain\Mapping\*.hbm.xml" />
<Compile Include="Domain\Query\*.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="BeforeBuild">
<Exec Command="%22c:\...\NHQG.exe%22 cs %(HbmFiles.FullPath) Domain\Query\" />
</Target>[code]
If i remove the HbmFiles line nothing happens.
I downloaded the bits from ayendes web site and also got the source from SVN.
I'm using VS05. any ideas on what i'm doing wrong?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 18, 2008 12:41 pm 
Newbie

Joined: Fri Mar 14, 2008 3:01 pm
Posts: 8
Location: Marysville, PA
Finally got this working. NHQG does not create the output directory if it does not already exist. I added the subDirectory Query to Domain and got it working.


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.