Closed georgemeng-cfwt closed 4 months ago
I have one template.cfg file and multiple models, currently in templates.cfg file, I have one line of code:
dao; ${BEANNAME}DAO.cfc ; sql ; dao.vm ; *
This will generate multiple files and each file will base on the model name. But I would the file to be the database table name not the model name.
Database table is in model file:
@DbTable(resource_versions)
In this case, I would the file generated as reosurce_versionsDAO.cfc not resourceVersionsDAO.cfc.
Any solutions?
I asked the same question here https://stackoverflow.com/questions/78395741/telosys-custom-basename. Got an answer from Igu, I currently don't know how to apply the answer.
Add the following code
#if ( $entity.hasDatabaseTable() )$target.forceEntityName( $entity.databaseTable )#end
At the top of .vm file, all file will be generated as expected.
I have one template.cfg file and multiple models, currently in templates.cfg file, I have one line of code:
dao; ${BEANNAME}DAO.cfc ; sql ; dao.vm ; *
This will generate multiple files and each file will base on the model name. But I would the file to be the database table name not the model name.
Database table is in model file:
@DbTable(resource_versions)
In this case, I would the file generated as reosurce_versionsDAO.cfc not resourceVersionsDAO.cfc.
Any solutions?
I asked the same question here https://stackoverflow.com/questions/78395741/telosys-custom-basename. Got an answer from Igu, I currently don't know how to apply the answer.