Fluent NHibernate - How to use/map a database view to populate a contained collection?

Mapping a view is the same as mapping a table, as long as you don't try to update it.

Mapping a view is the same as mapping a table, as long as you don't try to update it. What are you trying to do in this statement? References(x => x.

Where, "LocationId") .FetchType.Join(). WithColumns("Id").Cascade.None(); The "LocationId" is the key column name, but the WithColumns call will overwrite that value. An error or some other indication of what's happening or not happening would help.

I removed the WithColumns("Id"). The select statement is comparing InventoryLocations. ItemRefence to the FloorFill.Id and I need to map it to FloorFill.ItemRefence.

– Barry Jul 13 '09 at 14:36 You shouldn't have the WithTableName, that can be determined from the map of the other entity. In your InventoryLocationMap you should remove the ColumnName on your Id as that's the primary key, and remove the Map(x => x. ItemReference) because you're mapping your foreign-key as a property.

Now what happens? – James Gregory Jul 13 '09 at 17:43 I've edited the code listing to reflect my understanding of your suggested changes. This is not creating a Backstock location collection.

– Barry Jul 15 '09 at 17:05.

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