Andrea Aime wrote: > Justin Deoliveira ha scritto: >>> Anyways, this is less critical, I think it would be better to >>> solve the above regression part before releasing GeoServer 1.7.6 >>> instead given it's (rightfully imho) perceived as a regression >>> from the users pov (it makes NG datastore not a drop in replacement >>> for old ones). >> Agreed. If you want to cook up a patch I will be happy to review asap >> before 1.7.6. > > So I tried to make a patch but there is a design problem in the > ContentDataStore that won't let me implement a fix. > In order to remember whether a column was skipped I added a marker > in the feature type user map. JDCBDataStore.createFeatureSource > uses that mark to decide whether to return a store or a source, > but to do that it needs the feature type, and getSchema(typeName) > triggers the creation of a feature sources again, since it's the > ContentFeatureSource that computes the feature type to start with. > Long story short, infinite recursion. > > Some possible ways forward: > - make the datastore compute the feature type instead of the source > - workaound and make getSchema call a special method that won't > have to decide if to create a store or a source > (createFeatureSource(name, transaction, forceReadOnly)?)
Well createFeatureSource() gets passed a content entry, which has a reference to a content state, which contains the feature type. So what we could do is make sure the content state for auto transaction always has a feature type set even before createFeatureSource() is called. > > Cheers > Andrea > -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
