Hi List,
i have a Domain 'Notiz' and some other Domain's like
Project,Customer,Product etc. Each of this domains can have zero to
many 'Notizen.
Here is the mapping of Notiz:
public NotizMapping()
                {
                        Id(x => x.Id).GeneratedBy.GuidComb();
                        Map(x => x.Created);
                        Map(x => x.Modified);
                        Map(x => x.Betreff).Length(100);
            Map(x => x.Text).Length(3000);
            Map(x => x.Foreignkey);   !!!!!!!!!!! Foreign key to
other
Domains.
                }

and one other:
public CustomerMapping()
                {
                        Id(x => x.Id).GeneratedBy.GuidComb();
                        Map(x => x.Created);
                        Map(x => x.Modified);
                        Map(x => x.CustomerNumber);
                        References(x => x.Adress).Not.Nullable
().Cascade.All();
                        HasMany(x => x.Notizen)
                                .Cascade.All();
                }
now. fluent nhibernate creates a DataTable like this:
 create table "Notiz" (
        Id UNIQUEIDENTIFIER not null,
       Created DATETIME,
       Modified DATETIME,
       Betreff TEXT,
       Text TEXT,
       Foreignkey UNIQUEIDENTIFIER, <- just need a field to enter Key
to other Domain


       Customer_id UNIQUEIDENTIFIER, <- don't like this
       Project_id UNIQUEIDENTIFIER, <- don't like this


       Employee_id UNIQUEIDENTIFIER, <- don't like this


       primary key (Id)
    )


Any idea's
Thanks
Peter



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to