Jody Garnett ha scritto:
> Andrea Aime wrote:
>> I disagree on this approach, we're selling away the convenience for 
>> the most mainstream system (databases) just to handle the issue with two
>> other datastores. I would feel more comfortable having both, returing
>> fids right away if possible, and return all of them again at the
>> end of the transaction. In both cases, do preserve the insertion order,
>> since this is what the WFS spec requires us.
> This was not a question of convenience but of ability. Pretending we 
> have FIDs when we have not sent the request away to an external WFS is 
> causing a lot of pain. And some really bad hacks.

That's exactly ability that I was talking about. Sometimes you have to
code against the minimum common denominator because you don't know what
you're coding against (this is Geoserver case btw).

Other times, you need to leverage that extra functionality that only
the datastore you're playing against provides. Think for example about
applications that do hit a jdbc datastore but at the same time need
to alter other tables by direct jdbc access (using the same 
transaction), and need to references features somehow (so you need the
primary key of newly inserted features).
Now it's possible to write them if you're using the
FeatureWriter, or DataStore.addFeatures, if you don't care about order.
I don't want the API to change in a way that makes this impossible,
that's just my concern.
A programmer needing primary key does not give a damn about WFS 
limitations, he knows that the database generates the primary keys
on data insertion.

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to