|
|
Re: [CDO] exposing the DB name for the DBStore [message #1283738 is a reply to message #1283650] |
Thu, 03 April 2014 19:27 |
Erdal Karaca Messages: 854 Registered: July 2009 |
Senior Member |
|
|
Oh, sorry, you want the DB schema, not the table name...
Maybe, you could set a repository property to reflect the schema name you are using.
Erdal Karaca wrote on Thu, 03 April 2014 19:20So, you are constructing the query on the server side?
Then, this should work:
IDBStore store = ...
store.getMappingStrategy().getTableName(eClass);
Christophe Bouhier wrote on Thu, 03 April 2014 14:12Hi,
In MySQL queries exectuted with CDOQueryHandler need to have the DB name
prefixing a table name.
example:
private static final String SELECT_MVR_NON_CAMEL = "select val.cdo_id"
+ " from " + DB_NAME
+ ".metrics_metricvaluerange_metricvalues_list as val_list join "
+ DB_NAME + ".generics_value as val"
+ " on val_list.cdo_value = val.cdo_id"
+ " where val_list.cdo_source = :mvr_cdoid";
Now the DB_NAME is a hard coded static. I tried to get it from the
IRepository or IDBStore but to no avail... What is the API to get the DB
Schema name which can be used in a query?
Thank You Christophe
|
|
|
Powered by
FUDForum. Page generated in 0.02217 seconds