Did you try to add " around the column names?What database do you use?Maybe you 
can turn on GeoTools logging to see what SQL statement is executed.You can turn 
on JDBC logging in logging.properties :
org.geotools.jdbc.level=FINESTorg.geotools.jdbc.SQLDialect.level=FINEST

 

     On Wednesday, 12 November 2014, 14:17, fmd85 <florian-di...@gmx.de> wrote:
   

 geowolf wrote
> Hi,
> I've never tried, but did you setup the store to expose the primary key as
> normal
> attributes? I don't think we have a way to join on the feature identifiers
> (which
> is what the primary keys become when geotools handles them)

Hi,

at the beginning i used
DataStore ds= DataStoreFinder.getDataStore(propertiesMap);

After that i got my FeatureSource with
SimpleFeatureSource source = ds.getFeatureSource("Table_A");


After Ron's reply (thanks Ron!) i changed the DataSource to
JDBCDataStore ds = (JDBCDataStore)
DataStoreFinder.getDataStore(propertiesMap);
ds.setExposePrimaryKeyColumns(true);

Now the primary keys get found and i can use them in the Join-Statement, but
i get an SQLException (Invalid column index). I think i'v got another
mistake now.

Cheers,
Max



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Join-on-Primary-Keys-in-a-Query-tp5172471p5172569.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


    
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to