asp.net - Is it possible to do identity insert/update in SubSonic 2.0 -


unfortunately i'm stuck using undocumented/obsolete library (subsonic 2.0). i'm trying simple identity insert can't seem work.

here's psuedo-code version of i'm trying do:

subsonicexampleobject o = new select()                           .from(subsonicexampleobject.schema)                           .where(subsonicexampleobject.idcolumn)                           .isequalto(124124)                           .executesingle<subsonicexampleobject>();  if(o == null) {     o = new subsonicexampleobject();     o.id = 124124;     o.save(); } 

i've tried adding code above , below statement, no success:

new inlinequery()     .execute("set identity_insert " + subsonicexampleobject.schema + " on");      [code above]  new inlinequery()     .execute("set identity_insert " + subsonicexampleobject.schema + " off"); 

regardless of do, subsonic seems ignoring id value, , setting based on next identity value.

if knows how this, i'd super duper happy!


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -