Justin Deoliveira ha scritto: > Hi all, > > A quick update for where things are at. > > * cite tests are good to go for wfs. Soon we are going to need a matrix > for wfs cite tests :). But basically here are the tested configurations: > > wfs 1.0 postgisng with normal encoder --> check > wfs 1.0 postgisng with gtxml encoder --> check > wfs 1.0 h2 with gtxml encoder --> check > > wfs 1.1 h2 --> check > wfs 1.1 postgisng --> fail ** > > ** the remaining failures (only a handful) are due to how the jdbc-ng > drivers figure out what the feature id's are for inserted features. > Basically it tries to determine what the next fid will be before the > insert occurs which is an incorrect way of doing this. Especially with > postgis where we a) have the ability to figure out the sequence attached > to a column and b) have the currval and lastval functions at our disposal
As far as I know there are only two reliable ways to deal with generated primary keys: - call Statement.getGeneratedKeys after doing the insertion. This is the JDBC standard way to do so, but afaik most databases do not implement it, and/or it does not work in all cases, depending on the db. - know what the sequence is, get the next value programmaticaly, and use it in the insert. This is the way Hibernate does it, and it's reliable among most databases provided you can associate a sequence with the pk Did not check exactly what postgis-ng is doing, but I thought it was behaving like Hibernate?. Calling currval and lastval after the insert is certainly wrong, if the code calling them is not in the same transaction you might get the wrong id due to other writers pushing the sequence forward before you can read it (in other words, it will not work in auto commit mode with concurrent access). Even if you're in the same transaction accessing sequences might give you the wrong value (e.g., sequences are never rolled back even if the transaction that moved them forward is rolled back, so whilst they are guaranteed to never return the same number, they don't play with transactions the same way tables do). > I actually haven't run wms or wcs cite tests yet, but usually they are > pretty boring (famous last words). > > * release artifact descriptors have been updated to build artifacts for > 2.x and the new web application. I have tested the bin and war artifacts > and they work ok. I have yet to test any of the extension artifacts. > > So in terms of helping out, here is what is left to do: > > a) run wms and wcs cite tets I'll give a spin to those two Cheers Andrea ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
