There is also a problem when I join 2 tables of the same Oracle schema:

                Query query = new Query("table1");
                query.setAlias("tab1");
                Join join = new Join("table2", CQL.toFilter("tab1.column1 = 
tab2.column2"));
                join.setAlias("tab2");
                query.getJoins().add(join);

                FeatureCollection featureCollection = 
featureSource.getFeatures(query);

I get a RuntimeException saying property tab1/column1 is not found in table1.
Notice that the . in " tab1.column1" is replaced by a / in the exception 
message.

Ron






________________________________
 From: Ron Lindhoudt <[email protected]>
To: "[email protected]" 
<[email protected]> 
Sent: Tuesday, October 23, 2012 3:55 PM
Subject: [Geotools-gt2-users] Joining tables from multiple schema's
 

Is there a way to make an Oracle query that uses tables from 2 different 
schema's?

There was a posting from Andrea Aime in January 2012:

http://osgeo-org.1560.n6.nabble.com/JDBC-stores-hitting-multiple-schemas-td4265136.html

It looks like it was not possible. What is the situation now?

I would expect something like this:

                Query query = new Query("schema1.table1);
               
 query.setAlias("tab1");
                Join join = new Join("schema2.table2", 
CQL.toFilter("tab1.ID=tab2.ID"));
                join.setAlias("tab2");
                query.getJoins().add(join);


But at the moment you have to specify the schema at the Datastore and you 
cannot add a schema to the table-name in Query.


Ron

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to