Can you provide more context? What do you mean by "address id is on this 
table"? Address is almost always a "value type" - which means it has no 
identity, unless you have some specific case.

понедельник, 8 апреля 2013 г., 17:13:49 UTC+4 пользователь Felipe Oriani 
написал:
>
> Hi, 
>
> I am using Fluent NHibernate to map my entities on my project. I have a 
> model that has a relation by one and the Id of this relation is on the main 
> entity. For sample:
>
> public class Customer
> {
>     public Address Address { get; set; } // address Id is on this table
> }
>
> public class Supplier
> {
>     public Address Address { get; set; } // address Id is on this table
> }
>
> public class Address 
> {
>    // fields of this entity
> }
>
> When I get Save a Customer or Supplier entity on my session, the Address 
> is save together on the database, but when I Update these same entities, it 
> does not work, It create a new instace of the Address on my address table. 
> I would like to update the address instead create a new one. 
>
> I am mapping using this:
>
> References((x) => x.Address).Columns("ADRRESS_ID").Cascade.All();
>
> Thank you
>
> -- 
> ______________________________________
> Felipe B Oriani
> felipeoriani.com.br felipeori...@gmail.com <javascript:>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fluent-nhibernate+unsubscr...@googlegroups.com.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
Visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to