-1

Is it possible to configure the JDO XML meta-data descriptor file in a dynamic way ? (For example, depending on an external flag, etc) ?

To be more precise, I want to add an index to a table, but the client should "approve" before altering the table.

Thanks !

ferjani
  • 91
  • 7

1 Answers1

0

The JDO spec defines annotations, XML or a metadata API for defining how classes are persisted. The API is defined here http://www.datanucleus.org/products/accessplatform_4_0/jdo/metadata_api.html

Neil Stockton
  • 10,531
  • 3
  • 28
  • 27
  • Thanks for this advice, but I think it is more complicated. I need to create the index if it does not exist, and my app may be run using MySQL or derby databases. I tried to execute this query (using the API) "SELECT * FROM INFORMATION_SCHEMA.STATISTICS WHERE table_schema = 'myDB' AND index_name = 'MY_INDEX'" but it failed when a derby DB is used. I think this is related to this bug: https://issues.apache.org/jira/browse/DERBY-568 – ferjani Dec 16 '14 at 09:42
  • 1
    Why are you downvoting this attempt at answering a very vague question? If you want detailed answers then you provide more info. What does a bug in a datastore have to do with JDO ? (answer : nothing) – Neil Stockton Dec 16 '14 at 09:46
  • Well, if I knew more details were necessary, I'd had given enough. I started with a MySQL DB (and I forgot my derby DB), then I noticed that the app crashes with a derby DB and the link I attached is the explanation. Anyway, you answer could not be considered as a vague solution even for a vague question. Thanks for your time anyway ! – ferjani Dec 16 '14 at 10:20