I have an entity which data comes from the database, however, some of its properties are filled with data coming from another source (file system), so what I do is that my repository, instead of returning my entity, returns a proxy object that derives from the main entity, so the problem when I try to save or update is that it says there’s no persister for that class…
Is it possible to save a derived class but as the main class? My proxy object is identical to the real one except it overrides a couple of methods.
Thanks!
Seb 🙂
Yes, both
ISession.SaveandISession.Updatehave overloads that allow you to specify the entity name.Example: