nhibernate - saveOrUpdate(Object) method of Hibernate -
When I went to do hibernate to extend use saveOrUpdate (Object) method How do I know that line updates or new line Has been added to the table ??? Return method to save zero Orapdet (object), so this method is not able to know the results after the call.
Please help me.
As I understand your question and comments. You can create an event listener and two interfaces can apply: IPreUpdateEventListener, IPreInsertEventListener
eq
public class AuditEventListener: IPreUpdateEventListener, IPreInsertEventListener {public bool OnPreUpdate (PreUpdateEvent @ Event) Your stuff is wrong here; } Public bool OnPreInsert (PreInsertEvent @event) {// your stuff returns here incorrectly; }}
But I think this is ridiculous. Using ORM means that you do not care strongly about and made to work all the work unit. If you actually insert and only save the need to update () or Update () access methods, this way you will really know how to operation.
Comments
Post a Comment