Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
16Activity
0 of .
Results for:
No results containing your search query
P. 1
nhibernate reference

nhibernate reference

Ratings:

5.0

(1)
|Views: 2,867|Likes:
Published by leo_mahesh
n hibernate c#
n hibernate c#

More info:

Published by: leo_mahesh on Jul 27, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

11/08/2012

pdf

text

original

 
NHibernate Reference Documentation
Version: 1.0.2
 
Table of Contents
Preface............................................................................................................................................vi
...........................................................................11.1. Getting started with NHibernate..........................................................................................11.2. First persistent class...........................................................................................................21.3. Mapping the cat.................................................................................................................31.4. Playing with cats................................................................................................................41.5. Finally...............................................................................................................................6
................................................................................................................................72.1. Overview...........................................................................................................................7
..................................................................................................103.1. Programmatic Configuration.............................................................................................103.2. Obtaining an ISessionFactory............................................................................................113.3. User provided ADO.NET connection................................................................................113.4. NHibernate provided ADO.NET connection......................................................................113.5. Optional configuration properties......................................................................................133.5.1. SQL Dialects.........................................................................................................143.5.2. Outer Join Fetching...............................................................................................153.5.3. Custom ICacheProvider.........................................................................................153.5.4. Query Language Substitution.................................................................................163.6. Logging...........................................................................................................................163.7. Implementing an INamingStrategy....................................................................................163.8. XML Configuration File...................................................................................................16
......................................................................................................................184.1. A simple POCO example..................................................................................................184.1.1. Declare accessors and mutators for persistent fields.................................................194.1.2. Implement a default constructor.............................................................................194.1.3. Provide an identifier property (optional)..................................................................194.1.4. Prefer non-sealed classes and virtual methods (optional)..........................................194.2. Implementing inheritance.................................................................................................204.3. Implementing Equals() and GetHashCode().......................................................................204.4. Lifecycle Callbacks..........................................................................................................214.5. IValidatable callback ........................................................................................................22
...................................................................................................................235.1. Mapping declaration.........................................................................................................235.1.1. XML Namespace..................................................................................................235.1.2. hibernate-mapping.................................................................................................235.1.3. class.....................................................................................................................245.1.4. id..........................................................................................................................265.1.4.1. generator....................................................................................................265.1.4.2. Hi/Lo Algorithm.........................................................................................275.1.4.3. UUID Hex Algorithm.................................................................................285.1.4.4. UUID String Algorithm..............................................................................285.1.4.5. GUID Algorithms.......................................................................................285.1.4.6. Identity columns and Sequences..................................................................285.1.4.7. Assigned Identifiers....................................................................................295.1.5. composite-id.........................................................................................................295.1.6. discriminator.........................................................................................................305.1.7. version (optional)..................................................................................................30NHibernate 1.0.2 ii
 
5.1.8. timestamp (optional)..............................................................................................305.1.9. property................................................................................................................315.1.10. many-to-one........................................................................................................335.1.11. one-to-one...........................................................................................................345.1.12. component, dynamic-component..........................................................................355.1.13. subclass..............................................................................................................365.1.14. joined-subclass....................................................................................................365.1.15. map, set, list, bag.................................................................................................375.1.16. import.................................................................................................................375.2. NHibernate Types............................................................................................................385.2.1. Entities and values.................................................................................................385.2.2. Basic value types...................................................................................................385.2.3. Custom value types...............................................................................................405.2.4. Any type mappings................................................................................................415.3. SQL quoted identifiers......................................................................................................425.4. Modular mapping files......................................................................................................42
...................................................................................................................436.1. Persistent Collections.......................................................................................................436.2. Mapping a Collection.......................................................................................................446.3. Collections of Values and Many-To-Many Associations.....................................................456.4. One-To-Many Associations..............................................................................................476.5. Lazy Initialization............................................................................................................476.6. Sorted Collections............................................................................................................486.7. Using an <idbag>.............................................................................................................496.8. Bidirectional Associations................................................................................................506.9. Ternary Associations........................................................................................................516.10. Heterogeneous Associations............................................................................................516.11. Collection examples.......................................................................................................51
................................................................................................................547.1. Dependent objects............................................................................................................547.2. Collections of dependent objects.......................................................................................557.3. Components as IDictionary indices....................................................................................567.4. Components as composite identifiers.................................................................................567.5. Dynamic components.......................................................................................................58
.................................................................................................................598.1. The Three Strategies.........................................................................................................598.2. Limitations......................................................................................................................61
....................................................................................................639.1. Creating a persistent object...............................................................................................639.2. Loading an object.............................................................................................................639.3. Querying.........................................................................................................................649.3.1. Scalar queries........................................................................................................659.3.2. The IQuery interface..............................................................................................669.3.3. Filtering collections...............................................................................................679.3.4. Criteria queries......................................................................................................679.3.5. Queries in native SQL............................................................................................679.4. Updating objects..............................................................................................................689.4.1. Updating in the same ISession................................................................................689.4.2. Updating detached objects......................................................................................689.4.3. Reattaching detached objects..................................................................................699.5. Deleting persistent objects................................................................................................709.6. Flush...............................................................................................................................70NHibernate - Relational Persistence for Idiomatic .NETNHibernate 1.0.2 iii

Activity (16)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Matthew Burke liked this
Harshil O Hameed liked this
mamun_uh liked this
sandeepuppal liked this
aaa345 liked this
Deepak Rao liked this
ZoranMatuško liked this
Lamija liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->