Title: Basic Finder Generator for Hibernate 2

Description: Generate basic finders for hibernate properties. This requires two things in the hbm.xml files. The first is an indication of which fields you want to generate finders for. You indicate that with a meta block inside a property tag such as findByName The finder method name will be the text enclosed in the meta tags. If you want to generate a finder based on a join you can do something like this: findSavedGamessaveplayers Where foreign-finder-name will be the name of the finder when generated, foreign-finder-field is the field in the foreign class that you will want as a paramter to the finder (the criteria in the query) and foreign-join-field is the field in teh foreign class that joins to this object (in case there are more than one collection of these objects in the foreign class). After you've defined your finders, the second thing to do is to create a config file for hbm2net of the format: And then use the param to hbm2net --config=xxx.xml where xxx.xml is the config file you just created. An optional parameter is meta tag at the class level of the format: com.whatever.SessionTable.getSessionTable().getSession(); Which would be the way in which you get sessions if you use the Thread Local Session pattern like I do.

Copyright: Copyright (c) 2003

Namespace: NHibernate.Tool.hbm2net
Assembly:   NHibernate.Tool.hbm2net (in NHibernate.Tool.hbm2net)
Version: 1.2.0.4000

Syntax

Visual Basic (Declaration)
Public Class FinderRenderer _
	Inherits AbstractRenderer
C#
public class FinderRenderer : AbstractRenderer
Visual C++
public ref class FinderRenderer : public AbstractRenderer

Inheritance Hierarchy

System.Object
  NHibernate.Tool.hbm2net.AbstractRenderer
    NHibernate.Tool.hbm2net.FinderRenderer