Your version of sql2java may be prior to the 2.6.3 since I don't remember of generating the NAME_ fields in the Manager class.
I think you would need to make some change to the pertable/manager.java.vm template in order to make the FULL_FIELD_NAMES constant publicly available. Then you would use CocusMemberroleManager.FULL_FIELD_NAMES[CocusMemberroleManager.ID_IDCONFERENCE] where you used CocusMemberroleManager.NAME_IDCONFERENCE.
Alternatively you could modify the same template in order to generate the NAME_ fields as by:
#foreach ( $column in $columns )
/**
* Name of the $column.getName() field.
*/
public static final String NAME_$column.getConstName() = "$column.getName()";
#end
This may be a spare of time for your porting project. Just keep a version controlled copy of your tuned template.
Hope this helps,
Alain.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm porting a webapp to sql2java 2.6.6 from (i think) version 2.6.3.
I've just realized there there are many changes, for example the following doesn't work anymore:
query = "WHERE " + CocusMemberroleManager.NAME_IDCONFERENCE + "=" + idConference +
" AND (" + CocusMemberroleManager.NAME_ROLE + "='admin' OR " +
CocusMemberroleManager.NAME_ROLE + "='head')";
because NAME_IDCONFERENCE is not defined. Which is the preferred way to implement the
previous statment?
Thanks
R.
Your version of sql2java may be prior to the 2.6.3 since I don't remember of generating the NAME_ fields in the Manager class.
I think you would need to make some change to the pertable/manager.java.vm template in order to make the FULL_FIELD_NAMES constant publicly available. Then you would use CocusMemberroleManager.FULL_FIELD_NAMES[CocusMemberroleManager.ID_IDCONFERENCE] where you used CocusMemberroleManager.NAME_IDCONFERENCE.
Alternatively you could modify the same template in order to generate the NAME_ fields as by:
#foreach ( $column in $columns )
/**
* Name of the $column.getName() field.
*/
public static final String NAME_$column.getConstName() = "$column.getName()";
#end
This may be a spare of time for your porting project. Just keep a version controlled copy of your tuned template.
Hope this helps,
Alain.