Dashboard > ActiveRecord > Home > Recipes
Recipes
Added by Daniel Rothmaler, last edited by Damon Wilder Carr on May 10, 2008  (view change)
Labels: 
(None)


Snippets and techniques for achieving specific tasks, through the use of AR

A "lookup" property as an enum
Using an enum to map a look-up field that is not worth making a whole separate table/class.

An alternative to using NHibernate's custom collections
Using a ListWrapper<T> class, and extending to enforce sets using SetBehaviourListWrapper<T>.

Specifying Specifications
Ayende calls a specification "an explicit statement of the required characteristics for a matching entity / object", although some people like to call it search classes or search criteria. In this post he shows a way to make a persistable specification entity that creates NHibernate criteria. "Specifications are very useful concepts when you need to think about searches. They are useful because they seperate what you are searching from how you are searching."

Integrated Samples Across the Castle Portfolio
The beginning of a series of posts on more advanced examples to assist developers in moving from 'accomplished' to 'expert' in their execution of the techniques, patterns, practices, and philosophy Castle empowers.

Site running on a free Atlassian Confluence Community License granted to Castle Project. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators