We are using AutoMap in our project and it works great.  I do have a
question though.

I have an entity object that looks like this:

    public class Activity : Entity // Entity class from
FluentNHibernate, which has a long Id property
    {
        public virtual string Name { get; set; }
        public virtual string Street { get; set; }
        public virtual string City { get; set; }
        public virtual string State { get; set; }
        public virtual string Zip { get; set; }
        public virtual ActivityType ActivityType { get; set; }
    }

This object is actually populated from a SQL Server view.  I need to
have a composite key of Id and ActivityType because I could have
duplicate Id values (the view is drawing from multiple different
tables).

The problem is that if I do a query that brings back multiple rows
with the same Id value, NHibernate sees that the Ids are the same and
returns just makes a copy of the object that it already knows about
with that Id.

I don't know that this is necessarily an AutoMap issue... I don't know
how I would write mappings for this manually (in Fluent or regular
NHibernate) since part of the composite key is an object, not an
integer.

Any ideas?

Jon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to