I'm having trouble introducing inheritance into an existing database
structure.   The existing DB structure is used by legacy apps using native
sql, so I can't change the structure of the existing table, other than
 *adding* more things to the table schema.


so  I have an existing table/class something like this....

class Logger
{
      public virtual int Id { get; set; }
      public virtual Client Client { get; set; }
     // plus other things...
}

with a table, which I can't change or it will break other things, like  :-

create table tblLogger (
       lngLoggerID INT IDENTITY NOT NULL,
       lngClientID INT null;
       primary key (lngLoggerID)
)


There are other similar tables..... and what I want to do is introduce a
base class ( or interface ) so that I can put them into a collection

ie I want to change  Logger to be    class Logger :  Item

and then I can have a collection of items on some other Entity like...
 IList<Item> Items

So my problem is, if I try to do this, The Logger becomes a subclass of Item
and its Id doesn't work,  it wants to map in the Items Id and maintain Id
uniqueness across all subclasses.   But I want to keep the Loggers Id (and
that of other legacy tables who also have their own Ids) in tact because I
can't change how that works.

Any idea how I can map this?

Regards,

Keith

-- 
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