Hi, In my project i have a wpf client that has a locl db sqlite and a server which uses sql server as a database. Both use nHibernate.
I sync the server to the client sometimes and vise versa. I have entities, and child entities connected at hbm with a bag. Additionally, i use hilo as id generators. When i sync the server to the client, i wanna save entities (with children) with their original id's, brought from the server. I used nHsession.save with the overload that takes as a second parameter the id of the entity. This worked for the father, but the children got updated and because the id isn't 0. If I use the interceptor's IsTransient method the children are inserted but with a new id generated by hilo. If i change the id generator method to assigned everything works but i want it to be hilo for cases when i save new entities at the client. What should i do to get the sync to my client working with hilo AND keeping the server's ids? Thanks!! -- 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.
