Dave Slusher writes:
>> Your use of Cayenne is indeed unusual, though rather cool. If we are to
>> integrate this to Cayenne though, we need a solid mechanism to update the
>> objects after the insert is done. Anybody has any comments on how this
>> can be done?
>
> Don't most of the drivers have some way of retrieving this data? In mysql
> you have the last_insert_id function, in Oracle you have the curr_value of
> the sequence on the particular connection (I *think* this is threadsafe.
> We did an experiment where several of us were inserting via SQLPlus and
> inserts outside our own connections were not affecting our own
> curr_value).
I am too spoiled by using WebObjects/EOF, and now Cayenne :-). I rarely had
to use driver-specific tricks. But if at least some drivers have their own
mechanism for reading back generated values, I am all for adding this
feature to Cayenne.
Though I personally will have to put it on hold till I have some more time
from doing other tasks. But patches and other help is certainly welcomed.
>> One question about your changes. What is "defaultValue"?
>
> That is the default value of the column if not otherwise specified. I had
> to add that because we have a few cases where the default value is 1 or
> 100 or some other value beyond the "default" default of null/0.
I am dumb... I was thinking of a default value in a context of primary key
generation... Nevermind that.
Andrus
This archive was generated by hypermail 2.0.0 : Mon Jan 06 2003 - 15:02:07 EST