telosystools

Open full view…

Invalid Reference $databases in telosys 4.0.0

ing_magnus
Tue, 16 Aug 2022 15:03:05 GMT

Hi all, I'm trying to use the following istruction in a .vm file: #set($database = $databases.getDatabase( $model.databaseId )) but when I try to generate the files I have this error: Invalid Reference $databases In version 4.0.0 which is the correct way to retrieve the $database object? Many Thanks!

ing_magnus
Wed, 17 Aug 2022 16:52:33 GMT

Ok, many thanks

Telosys Team
Wed, 17 Aug 2022 16:53:53 GMT

There's no longer "$databases" object in Telosys version 4. Databases configuration is supposed to change according with the different environments ( dev, test, prod, etc), so it's no pertinent to get this kind of information from the Telosys databases configuration that is designed only to retrieve the database schema. You can still generate your database configuration files using static values (to be replaced after generation) or using your own specific variables defined in "telosys-tools.cfg" file ( eg : DBDRIVERCLASS, DBSCHEMA, DBUSER, etc)