Try nullable true as a test

On Saturday, May 10, 2014 3:27:50 PM UTC-5, Matteo Migliore wrote:
>
> Hi,
>
> I've (again) the tables
> Customer: Id, Name
> License: Id, Name, CustomerId (FK)
>
> The classes are:
> class Customer {
>     License License { get; set; }
> }
>
> class License {
>     Customer Customer { get; set; }
> }
>
> The mappings:
> - Customer
> OneToOne(x => x.License, m => { 
> m.PropertyReference(typeof(License).GetProperty("Customer")); 
> m.Cascade(Cascade.All); m.ForeignKey("none"); });
>
> - License
> ManyToOne(x => x.Customer, m => { m.Column("CustomerId"); 
> m.NotNullable(true); m.Fetch(FetchKind.Join); 
> m.Unique(true); });
>
> But it does not work. I tried many mappings but if the read works, the 
> write doesn't and viceversa.
>
> How write the correct mapping if I've a Customer with exactly 1 License 
> and the FK is from License to Customer?
>
> Thanks!
> Matteo
>

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

Reply via email to