> Something like: > > rec.store(Condition condition); > > would be very appreciated, though I see possible problems you already > mentioned (update or insert, affect multiple rows?).
Yes, I'd prefer not to run those risks. > Still, can there be either more control over record class (not necessarily > in interface, let a programmer take the risk of throwing SQL exception when > trying rec.update/rec.insert over a casted type not originally returned by > Factory.fetch()) or provide more clever function like updateNew(condition) > doing first select for condition and then update or insert. I'm not sure what you mean by "letting a programmer take the risk..." In any case, I remember now, that I might have a couple of interesting methods for you, if you check out the Factory's executeXXX() methods: http://jooq.sourceforge.net/javadoc/latest/org/jooq/impl/Factory.html#executeInsert%28org.jooq.Table,%20R%29 http://jooq.sourceforge.net/javadoc/latest/org/jooq/impl/Factory.html#executeUpdate%28org.jooq.Table,%20R%29 http://jooq.sourceforge.net/javadoc/latest/org/jooq/impl/Factory.html#executeUpdate%28org.jooq.Table,%20R,%20org.jooq.Condition%29 and similar ones... I forgot about that functionality. This was added in the very early days of jOOQ > At least storing field array of a record is still useful, but you must > identify/match the record in DB anyway, right? What do you mean by "identifying/matching" the record in the DB?
