castle-activerecord

DataGridView, BindingList<T>, DataGridViewComboBoxColumn

Hello So, I have a DataGridView using as datasource a BindingList DataGridView.DataSource = new BindingList<Car>{...} Where public class Car { public ColorName Color { get; set;} } with public class ColorName { public int Id {get; set;} public string Name{get; set;} } and I use a Combobox column: DataGridViewCom...

Why there is no hasOne relationship in castle activerecord in contrast to Ruby on Rails?

or how can i represent an address to country mapping where an address has one one country in castle activerecord? ...

Whats the pros and cons of using Castle Active Record vs Straight NHibernate?

Assuming that writing nhibernate mapping files is not a big issue....or polluting your domain objects with attributes is not a big issue either.... what are the pros and cons? is there any fundamental technical issues? What tends to influence peoples choice? not quite sure what all the tradeoffs are. ...

Is there a PDF version of the Castle Windsor documentation?

The only documentation I've found for the components of the Castle project I've found here in the form of online HTML files. Does anyone know of anything that is more off-line friendly or printable (e.g. PDF). I've got quite the long train commute and I'd like to put something on my laptop. :-) ...

How can i view the mapping configurations passed to the NHibernate by the castle activerecord?

Is it possible to view the mapping configurations / mapping xml files passed from activerecord to nhibernate? ...

Eager loading of lazy loaded entities in nHibernate using ActiveRecord

I'm working on a project that has a rich object model with various sets of aggregate roots. We're using the Castle stack (Monorail through to nHibernate with ActiveRecord). We have marked the aggregate roots as lazy [ActiveRecord(Lazy = true)] and have customized 'eager' routines on our Repository to eager fetch an object graph. We us...

Help with ActiveRecord exception "Failed to lazily initialize a collection - no session"

I am writing a web app using Castle ActiveRecord, and I keep getting this exception whenever I try to access a lazy loaded list of related objects. Here is my code: using(new SessionScope()) { foreach (var field in eventObj.RegistrationFields) { //Do something with the field here....

Castle ActiveRecord / NHibernate optimization question

Hi, I have the following structure: message (message table) may have multiple fields (fields table), and each field may have multiple subfields (stored in the same "fields" table with the only difference that fields dont have values in the "ParentField" column). Subfields may have subsubfields, etc., but this is not important. When I r...

Castle ActiveRecord / NHibernate optimization question, part 2

Sorry, didn't paste correctly in initial posting... Here is mapping file that ActiveRecord generates: <?xml version="1.0" encoding="utf-16"?> <hibernate-mapping auto-import="true" default-lazy="false" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:nhibernate-mapping-2...

asp.net mvc + activerecord saving object graph

I'm using asp.net mvc and I'm trying to create a new Employee, in my form I use the Html.DropDown(...) to display a list of Departments to select from. Ideally I would like MVC to just figure out which Department was selected (Id property is the value in dropdown), fetch it and set it in the incoming Employee object. instead I get a nu...

NHibernate.Search, Lucene index files not created

I have come across an issue with NHibernate.Search, where it all of a sudden stopped working, it cannot create files nor read the index-files at all. NHibernate seems to load it correctly: 2009-01-20 17:37:17,751 [1] DEBUG NHibernate.Impl.SessionFactoryImpl - instantiating session factory with properties: {use_reflection_optimize...

Lazy Reads in Castle.ActiveRecord

I am writting an application which needs to periodically (each week for example) loop through several million records ina database and execute code on the results of each row. Since the table is so big, I suspect that when I call SomeObject.FindAll() it is reading all 1.4million rows and trying to return all the rows in a SomeObject[]....

Castle ActiveRecord and The ActiveRecord VS Solution Template

What do you need to do or install to get the The ActiveRecord VS Solution Template working in Visual Studio 2008? I have installed the Castle Project, but I don't see any new solution templates in VS2008. ...

Castle ActiveRecord / NHibernate - Password Encryption or Hashing

What is the proper way to work with Passwords you don't want to store in clear text in a database? What are my options in NHibernate / Castle ActiveRecord? UPDATE: I was interested in how others handle this with NHibernate / Castle ActiveRecord. And if there was anything built into NHibernate or Castle ActiveRecord. ...

Castle ActiveRecord, Web Project, and the Bin folder

Which assemblies are necessary to add to the Bin folder for ASP.NET 3.5 project that is going to use Castle ActiveRecord? Is it: Castle.ActiveRecord.dll Castle.Core.dll Iesi.Collections.dll NHibernate.dll log4net.dll What else is needed? ...

What Does 'Insert = true' mean on an Castle Active Record Association

I am working on a project using Castle Active Record. I stumbled across the "Insert = true" attribute argument on the AR association today, but I couldnt workout what it actually does. [BelongsTo("UserId",Insert = true)] public ARUser User { get { return mUser; } set { mUser = value; } } Can someone give me a clue? I couldn't fi...

Help with a Castle Active Record DeleteAll HQL String

So I basically want to have a static method in my AR class to delete all records on a specified expression. But apparently Castle Active Record doesnt have an overload for IQuery params (at least not the version I am using). This is what I am "effectively" trying to acheive: public static void Delete(string pAppIdentifier) { DeleteA...

Is ActiveRecord bad practice?

I'm starting a new project and i've recently found castle project activerecord, which seems like a GREAT solution, but at the same time, it looks like something realy unconventional. I was wondering, does this feeling comes from learning something new (and i should just get used to it) or is really bad practice? ...

Is it Possible to set a Default Order By in Linq Attribute Mappings?

I it was possible to do this in Active Record, but is this feasible with Linq to SQL? ...

NHibernate / ActiveRecord: How to set foreign key without getting entire object?

Let's say I've got the following ActiveRecord class: [ActiveRecord] public class Account { ... [BelongsTo("CustomerId")] public Customer Customer { get; set; } } Currently, to set the value of the CustomerId field I have to get the entire Customer object from the database and assign it to the Account: Customer customer =...