Hello community, I need to populate entity from DB view (non-insertable) and make all entity updates to updatable DB table.
1. Mapping entity to table and writing custom load SQL from view is not an option since in some cases NHibernate still tries to select from table name (when joining this entity, for example). 2. Mapping entity to view and writing custom data modification queries is not an option since I can not write cross-database sql- insert statement (because of the last inserted identity value selection part). The only idea I came up with for now is to modify generated SQL statements on-the-fly. I managed to do it with custom interceptor but I don't think that its a good idea (since I intercept every single query, even for other entities). However, I think that it should be possible to change only needed queries using custom IEntityPersister. I created one based on SingleTableEntityPersister, specified it in <class persister="…">, but NHibernate doesn't even want to instantiate it. Are there any examples of writing custom entity persisters for NHibernate? Or how can I achieve my goal? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
