Click here to Skip to main content
15,884,007 members
Articles / Programming Languages / C#

Writing NHibernate Level 2 Cache Usage Tests

Rate me:
Please Sign up or sign in to vote.
4.69/5 (7 votes)
15 Jan 2009CPOL8 min read 52.7K   121   22  
Writing NHibernate Level 2 caching related tests by utilizing a custom log4net appender.
<?xml version='1.0' encoding='utf-8'?>
<hibernate-mapping xmlns='urn:nhibernate-mapping-2.2'>
  <class
			name='Domain.Child, Domain'
      table= 'Child'>
    <cache usage='read-write' region='NHibernate.Caches.Testing'/>

    <id name='Id'
        column='ChildId'
        unsaved-value='0'>
      <generator class='native' />
    </id>

    <property name='Data'/>
    <many-to-one name='Parent' column='ParentId' fetch='join' class='Domain.Parent, Domain'/>

  </class>
</hibernate-mapping>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader PragmaTouch
Turkey Turkey
- Software developer
- Has BS degree in Computer Engineering
- Has MBA degree
- Programmed with C, C++, Delphi, T-SQL and recently C#
- Little educational experience with Prolog
- Feel enthusiasm about NHibernate and LINQ
- Love to develop on Cuyahoga Web Framework
- Developer of PragmaSQL Editor
(Code Project Members Choice Winner for 2009 and 2010)
- Developed JiraTouch and MoodleTouch for iPhone
- PragmaTouch Lead (www.pragmatouch.com)

Comments and Discussions