Justin Deoliveira ha scritto: > Hi Andrea, > > Turning off validation at construction time is something that I > generally think everyone agrees with. And is something that is there > simply as a sanity check while switching to the new model. So it should > not be an issue to turn it off. > > As for the default value... if we do in fact *not* set a value when the > attribute is non-nillable, i believe that breaks the rules of the > feature model. I would suggest we proceed in one of two ways: > > 1) we open a debate about whether default value is useful in the model, > and take it out if need be. Gabriel has some good insight on this one. > > 2) we add a flag to SimpleFeaureBuilder to allow the versioning > datastore to change the behavior, and ignore the default even for > non-nillable attributes. > > If we do that will that fix your issue?
Hum, not exactly because versioning is a wrapper around the postgis datastore. The feature are really created in some pieces of code shared with all jdbc datastores. It should be possible to set that as a query hint... but it does not seem like a super clear option to me... For the record, the actual feature construction that breaks the code is (apparently) in JDBCFeatureWriter.next(), line 94: SimpleFeature temp = SimpleFeatureBuilder.template(featureType, null); So one would have to instruct the datastore to tell the jdbc feature write to tell the SimpleFeatureBuilder not to force default values in... Cheers Andrea Cheers Andrea ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
