Browse by Tags

All Tags » ActiveRecord (RSS)

ActiveRecord: Loading Records by Primary Key

I was reviewing some code today for a project that uses ActiveRecord .  One of the things that stood out for me was the use of a query to find objects by their primary key.  There's two reasons this raised a red flag for me: ActiveRecord already...
Posted by PSteele | with no comments
Filed under: ,

NHibernate Queries: HQL vs. Criteria API

As someone who did a lot of SQL a few years ago, I was immediately more comfortable using HQL for my ActiveRecord queries than the Criteria API.  But from a documentation/samples standpoint, I see a much higher percentage of the Criteria API being...
Posted by PSteele | with no comments
Filed under: ,

OutputDebugStringAppender in a web app?

I spent a couple of hours yesterday trying to get log4net to log to an OutputDebugStringAppender with no success.  At first, I thought I had a configuration error in log4net so I added a file appender and that works fine.  It's a Monorail application...
Posted by PSteele | 2 comment(s)

ActiveRecord: Never forget there's a database

Some lessons learned while using ActiveRecord . I really like ActiveRecord and I would recommend using it on .NET projects when there is the need an OR Mapping tool. The fault lay was us, the developers. We didn't pay enough attention to the fact that...
Posted by PSteele | with no comments
Filed under: ,

Generate ActiveRecord Classes from Existing DB Schema

GeneratorStudio is a project on CodePlex used to automate the creation of Castle ActiveRecord classes from existing database schema. I haven't downloaded it yet to play around with it, but it looks like it would be a nice thing to have if you have a large...
Posted by PSteele | with no comments
Filed under: ,

Mock Databases and ActiveRecord

Fellow SRT employee Jay Harris has a great post on using SQLite's in-memory database feature to mock his database .  He points out a few of the factors that drove him to investigate such an approach: I did not want a SQL Server installation to be...
Posted by PSteele | with no comments
Filed under: ,

ActiveRecord and a Custom NHibernate PrimitiveType

I was intrigued by Steve Smith 's blog post yesterday about reducing SQL Lookup tables in nHibernate . He gave an example of a WorkOrderStatus class the exposed the actual status as a POCO object that wasn't stored in the database. What really piqued...
Posted by PSteele | with no comments
Filed under: ,

ActiveRecord + HQL and an "IN" clause

Late last year as I was using MonoRail and ActiveRecord for a simple web application. I was helping my local church find volunteers with various skills to teach some basic computer courses to the the church staff. I wanted to keep track of the volunteers...
Posted by PSteele | 10 comment(s)
Filed under: , ,

Lazy Loading/Eager Loading

The NHibernate FAQ has a new post about complex object graphs and lazy loading. If you use NHibernate (or, ActiveRecord -- which makes NHibernate a whole lot easier), it's worth a look. The technique described can greatly improve the way your app interacts...
Posted by PSteele | with no comments
Filed under: ,

SRT's ActiveRecord Coding Sprint (and a "gotcha" to watch out for)

After our open house, a few of SRT's consultants stayed to have a little Coding Sprint with Castle -- specifically, ActiveRecord . Darrell Hawley , Jay Wren , Rocky Krcatovich and I started with the typical, employee database design: A company, which...
Posted by PSteele | with no comments
Filed under: ,
More Posts