polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanislav Muhametsin <stanislav.muhamet...@zest.mail.kapsi.fi>
Subject Re: propertyPK in AbstractSQLIndexing
Date Mon, 24 Aug 2015 10:45:03 GMT
On 24.8.2015 10:02, Kent SĂžlvsten wrote:
> Just guessing.
>
> Could it have something to do with an attempt to be compatible with
> multiple databases?
> As far as i remember, Oracle does not support autoincrement (but has
> sequences instead).

Hmm, yeah, the compatibility requirement/feature probably was the reason.

>
> (most ORM frameworks have pluggable key-generation strategies depending
> on the database used).

And yes, this would've been the proper solution.
I didn't know much about any stuff like that back in the days, so now 
it's stuck with the application generating IDs, which of course makes it 
incompatible in multiple applications -situation.


>
> Another thing is that the assigned values can be hard to grab on
> insertion -  but not sure if that is really a requirement, or simply a
> coincidence in the implementation.
>
> /Kent

At least PostgreSQL has the "INSERT ... RETURNING" clause, but obviously 
that is one more issue to solve through pluggable RDBMS-specific 
mixins/callbacks.


>
>
> Den 24-08-2015 kl. 08:45 skrev Stanislav Muhametsin:
>> On 24.8.2015 9:37, Niclas Hedhman wrote:
>>> Paul (or Stan?)
>>>
>>> In the above class there is a propertyPK that is passed around for each
>>> insertion and +1 and so on.
>>>
>>>     1. Does that mean that SQL Indexing will not work for
>>> multi-instances of
>>> Zest app?
>>>
>>>     2. Normally, one would depend on the auto-increment features in
>>> the DB.
>>> Why wasn't that done in this case?
>>>
>>>
>>> Cheers
>> Hmm, it's been years... Without looking at the code (since I have to
>> be at work in 15mins), I would make an educated guess that answer to
>> #1 is yes, and answer for #2 is no idea. I was quite a noobie back in
>> the days.
>


Mime
View raw message