Automapping multiple lists of the same type in an Entity - possible bug?

170 views
Skip to first unread message

tbushell

unread,
Nov 20, 2009, 4:16:04 PM11/20/09
to Fluent NHibernate
It appears that NHibernate cannot automap more than one IList of a
given type in an entity.

Consider the following two entities (based on the
Examples.FirstProject sample code that is included with the Fluent
NHibernate source code).

public class Employee
{
public virtual int Id { get; private set; }
public virtual string FirstName { get; set; }
public virtual string LastName { get; set; }
}

public class Store
{
public virtual int Id { get; private set; }
public virtual IList<Employee> Staff { get; set; }
public virtual IList<Employee> Managers { get; set; }
}

This seems to be a perfectly valid object model - each store has
several staff employees and several manager employees.

But when I automap, the Staff and Managers lists are stored in the
Employee table,all with the same foreign key.


Employee Table

Id FirstName LastName Store_id
3 Daisy Harrison 1
4 Jack Torrance 1
5 Sue Walkters 1
6 Tom Tommorow 1
7 Dick Diggler 1

The net result is that when the data is read back out of the database,
both Staff and Managers lists are populated with **every** row in the
table.

This looks like a bug in Automapping to me, but I'm fairly new to
NHibernate in any form, and don't fully know it's limitations yet.

In any case, how can I make NHibernate treat the two lists as
distinct?

If possible, I'd appreciate an Automapping code fragment that directly
addresses the sample code I've provided (e.g. something like "put this
exact override in the .Mappings section of your
CreateSessionFactory").

This is because I'm only somewhat familiar with Automapping, and not
at all familiar with the older ways of doing things, which means I
can't "fill in the blanks" very well yet.

But if you only have time to point me in the right direction, that
would be helpful too.

Here's my CreateSessionFactory code, to give some context:

private static ISessionFactory CreateSessionFactory()
{
ISessionFactory sessionFactory = null;

const string autoMapExportDir = "AutoMapExport";
if( !Directory.Exists(autoMapExportDir) )
Directory.CreateDirectory(autoMapExportDir);

try
{
var autoPersistenceModel =
AutoMap.AssemblyOf<Product>()
.Where(t => t.Namespace ==
"Examples.FirstProject.Entities")
.Conventions.Add( DefaultCascade.All() )
;

sessionFactory = Fluently.Configure()
.Database(SQLiteConfiguration.Standard
.UsingFile(DbFile)
.ShowSql()
)
.Mappings(m => m.AutoMappings.Add
(autoPersistenceModel)
.ExportTo
(autoMapExportDir)
)
.ExposeConfiguration(BuildSchema)
.BuildSessionFactory()
;
}
catch (Exception e)
{
Console.WriteLine(e);
}

return sessionFactory;
}

Eric Ridgeway

unread,
Nov 20, 2009, 5:31:02 PM11/20/09
to fluent-n...@googlegroups.com
Long story short.... the lists are all filled with the same Employee in that store when you "rehydrate" them because there is nothing to differentiate which Employees are Managers and and just plain employees... there are several ways to handle that...

   public class Employee
   {
       public virtual int Id { get; private set; }
       public virtual string FirstName { get; set; }
       public virtual string LastName { get; set; }
       public virtual bool IsManager {get; set;}
 
   }

   public class Store
   {
       public virtual int Id { get; private set; }
       public virtual IList<Employee> Staff { get; private set; }
       public virtual IList<Employee> Managers { get; private set; }

       public void AddManager(Employee employee){
           employee.IsManager = true;
           this.Managers.Add(employee);
      }

       public void AddEmployee(Employee employee){
           this.Employees.Add(employee);
      }
 
   }

just a rough start (its not perfect) to get you headed in the right direction....
hope it helps a little


--AF



--

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



Eric Ridgeway

unread,
Nov 20, 2009, 5:33:37 PM11/20/09
to fluent-n...@googlegroups.com
Forgot to mention that you need to use a Formula(or the like) to differentiate managers from employees to the two lists.

--AF

tbushell

unread,
Nov 20, 2009, 6:28:30 PM11/20/09
to Fluent NHibernate
Eric,

Thanks for the suggestion, but I just spent the last 10 minutes
googling "Formula", and couldn't make heads or tails of the examples I
found.

Could you :

- give me a sample formula (or point me to a good example)
- tell me exactly where I need to place the formula (in
CreateSessionFactory? In a new method I have to write?, etc)

Sorry to ask for so much hand holding, but I'm starting to think I
need to have an in-depth knowledge of NHibernate, Fluent NHIbernate,
and relational databases before I can do any real work with
Automapping.

This kind of defeats the whole idea of Automapping, in my mind. Maybe
my expectations were unreasonable, but I thought the point of
Automapping was to just design your object model (within certain
contraints dictated by FNH), and the automapping would hide all the
ugly object-to-relational details.

Don't get me wrong, it's great when everything works - not having to
explicitly load and save every column, having cascading saves, etc.
But I'm finding it a real chore to get my classes to map, and I'm not
doing anything out of the ordinary from an OO perspective (at least I
don't think so... multiple lists of the same type in an Entity, lists
of floats, etc)

Anyway, sorry for venting, and I'm grateful for any help you can give
me.

Thanks again,

-Tom
> >> fluent-nhibern...@googlegroups.com<fluent-nhibernate%2Bunsubscr­i...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/fluent-nhibernate?hl=.- Hide quoted text -
>
> - Show quoted text -

Paul Batum

unread,
Nov 21, 2009, 4:37:00 AM11/21/09
to fluent-n...@googlegroups.com
The automapper doesn't have anything to handle this case, mostly because there is no obvious "default implementation" for it. Eric's suggestion of using formula's was close but not quite what you wanted - instead it is "where".

Here are the classes:


public class Employee
    {
        public virtual int Id { get; private set; }
        public virtual string FirstName { get; set; }
        public virtual string LastName { get; set; }
        public virtual bool IsManager { get; set; }

    }

    public class Store
    {
        public virtual int Id { get; private set; }
        public virtual IList<Employee> Staff { get; private set; }
        public virtual IList<Employee> Managers { get; private set; }

        public Store()
        {
            Staff = new List<Employee>();
            Managers = new List<Employee>();

        }

        public void AddManager(Employee employee)
        {
            employee.IsManager = true;
            this.Managers.Add(employee);
        }

        public void AddStaff(Employee employee)
        {
            this.Staff.Add(employee);
        }

    }

Here is the mapping override for store:

   public class StoreMap : IAutoMappingOverride<Store>
   {
       public void Override(AutoMapping<Store> mapping)
       {
           mapping.HasMany(x => x.Managers)
               .Cascade.All()
               .Where("(IsManager = 1)");
           mapping.HasMany(x => x.Staff)
               .Cascade.All()
               .Where("(IsManager = 0)");
       }
   }

And the test (it passes):

[Test]
        public void Test1()
        {
            int id = 0;

            using (var session = _sessionFactory.OpenSession())
            using (var tx = session.BeginTransaction())
            {
                Store s = new Store();
                s.AddStaff(new Employee { FirstName = "Staff1"});
                s.AddStaff(new Employee { FirstName = "Staff2" });
                s.AddManager(new Employee { FirstName = "Manager1" });
               
                session.Save(s);
                id = s.Id;
                tx.Commit();
            }

            using (var session = _sessionFactory.OpenSession())
            using (var tx = session.BeginTransaction())
            {
                Store s = session.Get<Store>(id);
                Assert.AreEqual(2, s.Staff.Count);
                Assert.AreEqual(1, s.Managers.Count);

            }
        }


A fully working example has been tagged in my github repository.


To unsubscribe from this group, send email to fluent-nhibern...@googlegroups.com.

tbushell

unread,
Nov 23, 2009, 4:11:00 PM11/23/09
to Fluent NHibernate
Paul,

Many, many thanks for this! I now have working code I can start
putting in my application.

Also, because you provided a fully working, standalone project, I was
able to figure out why I'd been unable to get overrides to work in the
past.

I had been putting my map override classes (e.g. public class
StoreMap : IAutoMappingOverride<Store> { ... ) in the same file and
namespace as the Entity (the class "Store", in this case) was defined
in. Seemed like a logical place to put it - the class being
overridden and it's overrides are logically related, after all.

Much to my surprise, NHibernate throws "NHibernate.MappingException:
(XmlDocument)(2,4): XML validation error: ..." when you do this, with
absolutely no indication of what or where the real problem is - at
least as far as I could see.

By studying your project in it's entirety, I saw that the override
classes were defined in a different namespace (you did not mention
that in your posting above).

Maybe this is common knowledge to everyone else, but it was a BIG
surprise to me!

But because you went the extra distance and provided a fully working
sample, I was able to figure it out. ((Think I'll add a note to the
Automapping Wiki page, to prevent others from making the same
mistake.)

I moved the override classes from my entity namespace to my
application's namespace, and everything worked fine. As a bonus, I
can now map simple lists of floats, which is another issue I've
struggled with.

Thanks again!

-Tom

Paul Batum

unread,
Nov 24, 2009, 4:58:03 AM11/24/09
to fluent-n...@googlegroups.com
Interesting that the namespaces were the issue. I have no idea why this would be the case. If I find the time, I might try to reproduce it, because really this sounds like a bug to me.

In general most people (including myself) put their mapping classes and conventions in a seperate assembly to the domain objects themselves. We do this because we like to minimise the dependencies our domain assembly has. The fact that this is typical practice is probably why we haven't encountered the issue before.

Glad I could help,

Paul.

tbushell

unread,
Nov 25, 2009, 10:31:02 AM11/25/09
to Fluent NHibernate


On Nov 24, 4:58 am, Paul Batum <paul.ba...@gmail.com> wrote:
> Interesting that the namespaces were the issue. I have no idea why this
> would be the case. If I find the time, I might try to reproduce it, because
> really this sounds like a bug to me.

Yes, it certainly seems like a bug.


> In general most people (including myself) put their mapping classes and
> conventions in a seperate assembly to the domain objects themselves. We do
> this because we like to minimise the dependencies our domain assembly has.

I understand. But I think there are also some advantages to allowing
the mapping classes to be intermixed with the domain classes in the
same namespace and file. For me, at least, it makes the code easier
to understand.

Also, now that I have basic functionality working, I expect to be
making a lot of additions to my domain classes, and I'm problably more
likely to remember to update the mapping class when it's in the same
file.

-Tom

kimsk112

unread,
Dec 15, 2009, 11:19:22 AM12/15/09
to Fluent NHibernate
I am sorry to hijack this thread. I just wonder why you don't use Many-
To-Many (i.e., create an association table) to differentiate between
those lists? Is the above method (i.e., extra property in the class)
better way to do this?

Thanks,
karlkim

Hudson Akridge

unread,
Dec 15, 2009, 3:52:15 PM12/15/09
to fluent-n...@googlegroups.com
A many to many table would work where you specified separate tables in each many to many mapping. However I assume the way it's set up the OP only wanted 1 store association per employee.

Another way of solving this comes down to (what I consider to be) proper OO design using inheritance. Staff and Managers should be separate classes that have a base class of Employee. Staff and Managers can be mapped either using a join or discriminator mapping and they are treated as separate classes. Your two collections would each hold a generic type reference to the class responsible, and NHibernate/FNH/automapping will take care of correctly retrieving your staff/managers and putting them into the proper collections. All without having to do any additional work on your end.

To me, this would be the most optimal way to solve your problem, because I don't see this as an NH/FNH issue at all, but rather a design issue that to keep, has to create a hack in NH/FNH which is unnecessarily complicating the implementation. 

--

You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group.
To post to this group, send email to fluent-n...@googlegroups.com.
To unsubscribe from this group, send email to fluent-nhibern...@googlegroups.com.

kimsk112

unread,
Dec 16, 2009, 10:24:55 AM12/16/09
to Fluent NHibernate
Thanks for sharing your thought. I agree that this has nothing to do
with NH or FNH, but it is more about design decision. For many-to-many
way, if the class will be used again in another place (e.g., new
collection or a collection in another class), I will not need to
create another child class just for that.

Enjoy coding!
--karlkim

tbushell

unread,
Dec 16, 2009, 3:22:27 PM12/16/09
to Fluent NHibernate
My sample code was based on the "Examples.FirstProject", which I
hacked just enough to demonstrate the problem. You, Hudson and Paul
all raise valid points about the flaws in the design. But maybe my
choice of sample code is clouding the issue a bit.

Also, I chose to use NHibernate because I wanted to do a pure, Object
Oriented data model, without being distracted and contrained by the
minutae of the underlying DB - like which tables get mapped to which
classes, how the relationships are set up, etc. (I realize now I was
a bit naive, but ideallly, that's still the way I'd like to approach
it).

Here's the actual class I needed to map:

public class DlsAppOverlordExportRunData
{
public virtual int Id { get; private set; }

public virtual DateTime StartDateTime { get; set; }
// ... other members omitted for clarity ...

public virtual IList<DistributionResults>
LogNormalDistributionTable { get; set; }

public virtual IList<DistributionResults>
ContinDistributionTable { get; set; }

public virtual IList<DistributionResults>
NnlsDistributionTable { get; set; }

// ...
}

As you can see, this class has 3 lists of DistributionResults
objects. I firmly believe this is a good object model for our problem
domain (a scientific instrumentation application).

I also believe that it is not unreasonable to have multiple lists of
the same type in a class, and was very surprised that Automapping did
not handle it. Surely I'm not the first person who's wanted to do
this?

Solution is not that hard, once you know the "trick". I just added a
SubId member to the classes I needed to do Where overrides on, but it
seems like a bit of a kluge.

How hard would it be to make this work automatically in Fluent
Nhibernate?

-Tom

James Gregory

unread,
Dec 16, 2009, 3:46:51 PM12/16/09
to fluent-n...@googlegroups.com
I was going to write a long winded reply concerning your design decisions, but I think it can more easily be summed up as:

If it hurts, don't do it.

You're the first person in the life of FNH to need to do this, that should raise alarm bells.

We'll gladly accept a patch to support this behaviour, but I don't think implementing it will be an easy task.

--

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



Paul Batum

unread,
Dec 16, 2009, 4:57:43 PM12/16/09
to fluent-n...@googlegroups.com
Would we?

To be honest I'm skeptical about whether the extra complexity would be worth it in this case. Especially considering that there are multiple ways in which this scenario can be handled in terms of relational db schema...

In my opinion, if people really want to approach the implementation of their application with "all I care about is my object model, I don't want to have to think about persistence" attitude, maybe they should be looking at an object oriented database such as db4o. Working with NHibernate makes persistence easy, but I still have to think about my relational model and how I want it mapped. Fluent NHibernate makes the configuration of NHibernate even easier, but still, I expect to have to think about my relational model and how I want it mapped.

Paul

James Gregory

unread,
Dec 16, 2009, 5:00:03 PM12/16/09
to fluent-n...@googlegroups.com
I agree entirely. I was just trying to be polite.

cliff vaughn

unread,
Dec 17, 2009, 3:35:54 AM12/17/09
to fluent-nhibernate
Just curious, can someone show the other ways of mapping this that would work well in FNH?
thanks

cliff

Paul Batum

unread,
Dec 17, 2009, 5:09:49 AM12/17/09
to fluent-n...@googlegroups.com
There's two major options. Either you leave it as one to many, or you make it a many to many. As a one to many, you end up with flags on the child table. As a Many to Many, you can either have flags on the joining table, or you can have multiple joining tables. One option will probably make more sense, depending on what your rules are - for example, can a single instance of the child object appear in more than one list? That said, you won't be able to infer these rules simply by examining the domain object structure.

cliff vaughn

unread,
Dec 17, 2009, 9:29:47 AM12/17/09
to fluent-nhibernate
THanks Paul, but i was hoping to see some mappings to help illustrate the point a bit clearer.  Specifically, the one to many with flags.  I'm assuming you'd just have to specify a where clause, but not completely sure.  Also, could you do something like that with a one to one type mapping?

tbushell

unread,
Dec 17, 2009, 11:35:02 AM12/17/09
to Fluent NHibernate

On Dec 16, 4:57 pm, Paul Batum <paul.ba...@gmail.com> wrote:
> Would we?
>
> To be honest I'm skeptical about whether the extra complexity would be worth
> it in this case.

Thanks for clarifying. I asked because if you and James thought it
was a simple change, I would have looked into attempting it myself.
Realistically, I'm months away from even thinking about digging into
the Fluent source, so I won't worry about it for now.


> In my opinion, if people really want to approach the implementation of their
> application with "all I care about is my object model, I don't want to have
> to think about persistence" attitude,

Like I said, I've come to realize my expectations were somewhat
unrealistic... ;-)

> maybe they should be looking at an

> object oriented database such as db4o <http://www.db4o.com/>.

I had considered using an OO DB, but there seemed to be a rough
consensus (at least on the Internets) that they had not lived up to
their potential, so FNH seemed like a less risky option.

> Working with
> NHibernate makes persistence easy, but I still have to think about my
> relational model and how I want it mapped. Fluent NHibernate makes the

> configuration of NHibernate even easier, but still, *I expect to have to
> think about my relational model and how I want it mapped*.

Again, thanks for clarifying - I wasn't sure what your goals for
Automapping were. Looks like I need to buckle down and educate myself
a bit beyond "knowing just enough to be dangerous" about RDB design.


On Thu, Dec 17, 2009 at 7:46 AM, James Gregory

<jagregory....@gmail.com>
wrote:

> > I was going to write a long winded reply concerning your design decisions,
> > but I think it can more easily be summed up as:
> > If it hurts, don't do it.
> > You're the first person in the life of FNH to need to do this,that should
> > raise alarm bells.

Consider them raised - if I'm going down a bad road, I certainly don't
want to continue. But, like Cliff Vaughn, I'm also having a bit of
trouble understanding how to implement a better alternative.

-Tom

tbushell

unread,
Dec 17, 2009, 11:51:43 AM12/17/09
to Fluent NHibernate

On Dec 17, 9:29 am, cliff vaughn <cliftonfvau...@gmail.com> wrote:
> THanks Paul, but i was hoping to see some mappings to help illustrate the
> point a bit clearer.  Specifically, the one to many with flags.  I'm
> assuming you'd just have to specify a where clause, but not completely
> sure.

Cliff, did you notice this code fragment in Paul's sample?

public class StoreMap : IAutoMappingOverride<Store>
{
public void Override(AutoMapping<Store> mapping)
{
mapping.HasMany(x => x.Managers)
.Cascade.All()
.Where("(IsManager = 1)");
mapping.HasMany(x => x.Staff)
.Cascade.All()
.Where("(IsManager = 0)");
}
}


Or are you asking a different question?

Also, are you aware of the discussion "An entity with multiple Many-To-
Many lists of the same type?"
http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/302d5f0a11f0fb70/66a0bc50417408aa?hl=en#66a0bc50417408aa

I have not followed this in detail, but it seems to be related.

-Tom

cliff vaughn

unread,
Dec 17, 2009, 12:09:18 PM12/17/09
to fluent-nhibernate
On Thu, Dec 17, 2009 at 4:51 PM, tbushell <tbus...@bic.com> wrote:

On Dec 17, 9:29 am, cliff vaughn <cliftonfvau...@gmail.com> wrote:
> THanks Paul, but i was hoping to see some mappings to help illustrate the
> point a bit clearer.  Specifically, the one to many with flags.  I'm
> assuming you'd just have to specify a where clause, but not completely
> sure.

Cliff, did you notice this code fragment in Paul's sample?

 public class StoreMap : IAutoMappingOverride<Store>
  {
      public void Override(AutoMapping<Store> mapping)
      {
          mapping.HasMany(x => x.Managers)
              .Cascade.All()
              .Where("(IsManager = 1)");
          mapping.HasMany(x => x.Staff)
              .Cascade.All()
              .Where("(IsManager = 0)");
      }
  }

 
I did notice this, but dismissed it since I don't use auto mappings and i assumed this was related to that.  On second look, it does seem to give me what i was after if it works with regular maps.
 
Or are you asking a different question?

Also, are you aware of the discussion "An entity with multiple Many-To-
Many lists of the same type?"
http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/302d5f0a11f0fb70/66a0bc50417408aa?hl=en#66a0bc50417408aa


I was aware of this discussion, but again it was related to auto mapping which i currently don't use and i dismissed it.  Thanks for the pointers.  Now the follow-up question would be how to do this with References or HasOne and just get one item.  My first guess would be to just use the list and add an additional unmapped property and return the first item from the list, but that seems hackish.  Any suggestions?
 
I have not followed this in detail, but it seems to be related.

-Tom
--

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





--
thanks

cliff

Martin

unread,
Dec 17, 2009, 12:17:17 PM12/17/09
to Fluent NHibernate
I still think the best alternative is to look at Hudsons earlier
advice and use inheritance. Using your example:

public class DistributionResult{
....
}

public class LogNormalDistributionResult : DistributionResult {
...
}

public class ContinDistributionResult : DistributionResult {
...
}

public class DlsAppOverlordExportRunData
{
public virtual int Id { get; private set; }

public virtual DateTime StartDateTime { get; set; }
// ... other members omitted for clarity ...

public virtual IList<LogNormalDistributionResult>
LogNormalDistributionResults { get; set; }
public virtual IList<ContinDistributionResult>
ContinDistrbutionResults {get; set; }


// ...
}


tbushell

unread,
Dec 17, 2009, 3:10:16 PM12/17/09
to Fluent NHibernate
Martin,

I think I'm starting to get this, except for one thing...

You've introduced two new classes that inherit from
DistributionResult, but don't show any members for them. What, if
anything, do I put between the braces?

Also, if it's any help, here's my current implementation of
DistributionResult. (I assume I'll be able to eliminate the SubId
member if I use the new approach?).

public class DistributionResult
{
public virtual int Id { get; private set; } // Required by
NHibernate

// NHibernate cannot automap more than one IList of the same
// type in a class. SubId allows us to add a "Where"
override.
// See class DlsAppOverlordExportRunDataMap.
public virtual int SubId { get; private set; }

public virtual float Value { get; set; }
public virtual float Relative { get; set; }
public virtual float Cumulative { get; set; }
}

Thanks for your help.

-Tom

tbushell

unread,
Dec 17, 2009, 3:46:20 PM12/17/09
to Fluent NHibernate

On Dec 17, 12:09 pm, cliff vaughn <cliftonfvau...@gmail.com> wrote:
> I did notice this, but dismissed it since I don't use auto mappings

I tend to do the opposite, since I try to do everything with
Automapping.

> On second look, it does seem to give me
> what i was after if it works with regular maps.

Can't say for sure, but I strongly suspect that you can. As far as I
can tell, Automapping just builds on the regular mapping
functionality.

I'd like to be able to give you a code fragment that shows the exact
syntax you need (that's the level of detail I always need, it seems :-
( ), but cannot, alas, since I don't use regular mapping.

No doubt someone else will be able to help.

-Tom

Paul Batum

unread,
Dec 17, 2009, 4:03:44 PM12/17/09
to fluent-n...@googlegroups.com
Sorry Cliff I misunderstood your question. Perhaps it would be best if you started a new thread and explained your situation?


-Tom

Martin Hornagold

unread,
Dec 18, 2009, 4:22:19 AM12/18/09
to fluent-n...@googlegroups.com
In your case you wouldn't need any extra members for the subclasses.
Yes lose the SubId.

Martin,

Thanks for your help.

-Tom

--

tbushell

unread,
Dec 18, 2009, 2:19:36 PM12/18/09
to Fluent NHibernate

On Dec 18, 4:22 am, "Martin Hornagold"


<Martin.Hornag...@marstanit.com> wrote:
> In your case you wouldn't need any extra members for the subclasses.

But I still need an Id member in the new classes, correct? i.e.

public class LogNormalDistributionResult : DistributionResult {


public virtual int Id { get; private set; }
}

public class ContinDistributionResult : DistributionResult {


public virtual int Id { get; private set; }
}


Or are you saying that the classes can be totally empty?

-Tom

> For more options, visit this group athttp://groups.google.com/group/fluent-nhibernate?hl=en.- Hide quoted text -

James Gregory

unread,
Dec 18, 2009, 7:37:37 PM12/18/09
to fluent-n...@googlegroups.com
They can be completely empty. They inherit their properties.

tbushell

unread,
Dec 19, 2009, 5:41:35 PM12/19/09
to Fluent NHibernate

On Dec 18, 7:37 pm, James Gregory <jagregory....@gmail.com> wrote:
> They can be completely empty. They inherit their properties.

Got it - will try this on Monday.

Thanks for the help, everybody.

-Tom

> >> For more options, visit this group athttp://groups.google.com/group/fluent-nhibernate?hl=en.-Hide quoted text -

Reply all
Reply to author
Forward
0 new messages