Fluent NHibernate reflection mappings?

Using Reflector it looks like Table method has this signature.

Using Reflector, it looks like Table method has this signature: public void Table(string tableName) { this.attributes. Set(x => x. TableName, tableName); } Columns will be a lot harder as it keeps properties, references, and collections separate.Eg.

Protected virtual PropertyPart Map(PropertyInfo property, string columnName) { PropertyPart propertyMap = new PropertyPart(property, typeof(T)); if (!string. IsNullOrEmpty(columnName)) { propertyMap. Column(columnName); } this.properties.

Add(propertyMap); return propertyMap; } In theory though you could get the private fields attributes, properties, and references via reflection and get the information that way.

Turns out I didn't need this as much as I thought. Apparently the CreateQuery method in nbernate parses the string with the object name and maps the class field names to column names for you - still learning nhibernate :\ I've ended up writing my own Update method which takes a list of lambda expressions of fields to update and the new values and a list of lambda expressions for the conditional clause rather than using nbernate to load each entity for each update. – johnnyboy Feb 2 at 4:10.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions