Closed lando84 closed 2 years ago
You need to upgrade the database so that the structure fits to the version of the Java API you are using:
Upgrades.on(db);
Is this a function available on OpenLCA Java API?
Thank you very much! It works!!!!!!
I got a new related issue: once I upgraded the DB by means of Upgrades.on(db), the db becomes not openable via OpenLCA app with the following error: "The given database is newer than this openLCA version". If I reload a db from scratch, I update it by means of OpenLCA and I try to get the db version by means of getVersion() method I see 9 instead 11 --> so this implies I should execute Upgrades.on(db) making the db not openable by openLCA.
yes, if you run Upgrades.on
from the API, you need to use a matching openLCA version if you want to use this database in the user interface then. You can check the version via IDatabase.CURRENT_VERSION
, e.g. in the Python editor of openLCA:
from org.openlca.core.database import IDatabase
print(IDatabase.CURRENT_VERSION)
Hi all, I was trying to access to OpenLCA DB by means of Java API. In particular I was not able to retrieve product systems by means of ProductSystemDao object. I wrote this following simple code:
And I got a the following db error:
The error seems to be quite clear, in fact if I try to execute the same query (removing "library" and "tags" fields) directly with NativeSQL, it works properly but it is not what I would like to do because I would pass through ProductSystemDao.
If I try to retrive processes by means of ProcessDao...
I got a similar error.
Thank you in advance.