Try OneToOne on one side (Customer to License) and ManyToOne on the other
(License to Customer).
RP
On Wednesday, May 7, 2014 8:20:45 PM UTC+1, Matteo Migliore wrote:
>
> Hi,
>
> here the tables:
> Customer [Id, Name]
> License [Id, Name, CustomerId]
>
> The classes:
> class Customer
> {
> Id, Name, License
> }
>
> class License
> {
> Id, Name, Customer
> }
>
> How is the mapping by code? I tried two ManyToOne but it doesn't work.
>
> I also need to specify the CustomerId column in the mapping because is an
> "exception"
> the convention for the other tables is ForeignTable_Id so with the
> unserscore.
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.