views:

88

answers:

1

Is it possible to configure the default settings on Castle Activerecord attributes? For example, I'd like all strings to have length 4001 (which makes it a nvarchar(MAX) on SQL Server) without having to put Length=4001 on every [Property] attribute. I'd also like all collections to be lazy-loaded without having to put Lazy=true on every [HasMany] attribute.

A: 

Take a look at this question. You can use the same mechanism to programmatically inspect and change the ActiveRecord model before it's passed to NHibernate.

Mauricio Scheffer