ofbiz - Get SQL command from EntityCondition -
i have entitycondition , want sql it.
for ex:
entitycondition: partyid = 'admin' -> sql: party_id = 'admin'
i have tried find in ofbiz project, have not found anything.
there's general rule in ofbiz: entities , fields defined in camelcase, partyattribute or productid. entities begin uppercase letter (like java class) , fields begin lowercase letter (like java class attribute).
an uppercase letter inside entity or field converted "_[lowercase]".
so
entitycondition: partyid = 'admin' -> sql: party_id = 'admin'
a full select entity partyattribute be
select * party_attribute party_id = 'admin'
you may try
makewherestring(modelentity modelentity, list<entityconditionparam> entityconditionparams, datasourceinfo datasourceinfo)
to achieve programmatically, haven't tried it.
Comments
Post a Comment