cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@maniatis.org>
Subject Re: String-with-number sort and insert order preservation
Date Wed, 03 Feb 2010 13:35:19 GMT
On 3/02/10 11:04 PM, Marek Ĺ abo wrote:
> haven't any of you ever needed or wanted the data to be indexed by
> auto-generated pk in order you add them to context while in persisting
> phase?

Sure, but the solution is trivial. Add a 'created_on' field to that table.  Stick the current
datetime in there.

Every single time in my entire career I've ever come across meaningful primary keys, problems
have been caused as a result. I even came across one database where the developer had twisted
themselves in knots complying with a customer demand that the meaningful primary key be able
to be user modified. That code updated foreign keys in 12 related tables.


Ari

-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Mime
View raw message