unfortunately, yes

On Wed, Jun 17, 2009 at 8:24 PM, Fabio Maulo<[email protected]> wrote:
> legacy db, right ?
>
> 2009/6/17 caiokf <[email protected]>
>>
>> Hi,
>>
>> I'm having trouble mapping some classes, and wonder if someone could
>> help me with this
>>
>> Objects (relevant ones):
>>
>> public class Order
>> {
>>        public virtual int ID { get; set; }
>>        public virtual Company Company { get; set; }
>>        public virtual IList<OrderLine> Itens { get; set; }
>>        //...
>> }
>>
>> public class OrderLine
>> {
>>        public virtual int ID { get; set; }
>>        public virtual int OrderID { get; set; }
>>        public virtual Company Company { get; set; }
>>        public virtual Product Product { get; set; }
>>        //...
>> }
>>
>> public class Company
>> {
>>        public virtual int ID { get; set; }
>>        public virtual string Name { get; set; }
>>        //...
>> }
>>
>> and in the database I have:
>>
>> - ORDER TABLE : composed key (ID and COMPANY_ID)
>>
>> - ORDERLINE TABLE : composed foreign key to order  (ORDER_ID,
>> COMPANY_ID)
>>                    key (ID, COMPANY_ID)
>>
>>
>> My problem is: how can I map this composed foreign key in ORDERLINES
>> to be a list in the ORDER object, while being different from it's
>> composed primary key??
>>
>> Any help appreciated.
>> Thanks.
>>
>
>
>
> --
> Fabio Maulo
>
> >
>

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