Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.programming
Should onInsert call onUpdate?
Victor Porton
11/27/2015 5:42:00 PM
I am writing a lightweight ORM for SQL.
I create virtual methods onBeforeInsert, onBeforeUpdate and onAfterInsert,
onAfterUpdate which are called respectively before or after INSERT or UPDATE
SQL statements (done by my ORM when I ask it to save an object to the DB).
Should on{Before,After}Update also be called for INSERT queries?
My logical construction is the following: INSERT can be logically equivalent
to creating a "default" object and then UPDATE it.
Accordingly this thought, when inserting all four virtual method should be
called.
What do you think on this?
--
Victor Porton -
http://porton...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Should onInsert call onUpdate?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password