Sometimes I have to get an ID and have to use it later again. Example (I hope better than the last ;-):
Lookup ID for role "admin"
Set property "admin-role-id" = result from the lookup
Update () table "users" - set role to property "admin-role-id" for user "zierhut"
Yesterday I had the idea of testing it with in the . It didn't test it right now but is it possible to use there a sql query like "(SELECT id FROM roles WHERE title='admin')"?
I think the valueComputed with a select should work fine assuming your database supports that. Otherwise you can use subselects like your select in an block (again, assuming database supports it)
I see that this is a really old qustion, and wonder if there is any change to this?
It would be really helpful for us to be able to set a property value dynamically via a query. The case is the following:
we have a number of customers using Oracle databases, some are using Enterprise Edition and others are using Standard Edition.
For customers using Enterprise edition, we wish to take advantage of this for example by creating indexes with the ONLINE keyword. For customers on standard edition however, that will fail. In other cases using Enterprise edition functionality will not fail, but WILL violate license limitations for those customers.
We wish to define a property IsStandardEdition, and based on the value of this property use or not use that kind of functionality in the liquibase scripts.
The value could be initialized from a query such as:
select count(*) as IsStandardEdition
from v$version v
where v.banner not like '%Enterprise Edition%'
and v.banner not like '%EE%'
and v.banner like 'Oracle Database%'
Is this now possible, or is the 11 year old answer still the same?