At 11:41 PM 1/3/2003 -0500, you wrote:
>Hi Dave,
>
>Using opaque database mechanisms for the primary key generation was
>intentionally "overlooked" in Cayenne. The reason being a problem of
>retrieving the value, that was just assigned to the inserted row, back
>into the object on the Java side. This is absolutely essential for the O/R.
>
>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).
>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.
This is why I was curious if any of these alterations have relevance beyond
our admittedly odd use of it.
d
This archive was generated by hypermail 2.0.0 : Mon Jan 06 2003 - 11:23:41 EST