Ryan Albrecht
03/17/2022, 11:58 PMRyan Albrecht
03/18/2022, 12:00 AMBaseEntity.cfc
i have defined this method
private function defineConstraints(struct constraints){
if(isDefined('super.constraints')){
structAppend(this.constraints, arguments.constraints);
}else{
this.constraints = arguments.constraints;
}
}
Ryan Albrecht
03/18/2022, 12:00 AMfunction init(){
super.init();
defineConstraints({
quantity: { required:true, type:"numeric" }
});
}
Ryan Albrecht
03/18/2022, 12:01 AMDaniel Mejia
03/18/2022, 12:12 AMDaniel Mejia
03/18/2022, 12:13 AMDaniel Mejia
03/18/2022, 12:13 AMRyan Albrecht
03/18/2022, 12:59 AMthis.constraints
on the object instance which is the problem I am having.sknowlton
03/18/2022, 1:53 AMthis.constraints
directlysknowlton
03/18/2022, 1:54 AMthis.constraints
on the parent with getConstraints()
, then on Trade.cfc
I'd have getConstraints()
which does return SUPER.getConstraints().append({ someNewConstraints }, true );
and then the same thing on Forward.cfc
sknowlton
03/18/2022, 1:55 AMthis.someMoreConstraints
and still using getters anywaydeactivateduser
03/18/2022, 2:25 AMdeactivateduser
03/18/2022, 2:32 AMdeactivateduser
03/18/2022, 2:36 AMdeactivateduser
03/18/2022, 2:37 AMRyan Albrecht
03/18/2022, 12:40 PMsknowlton
03/18/2022, 1:58 PMsknowlton
03/18/2022, 1:58 PMvalidate( target = someObject, constraints = someObject.getADifferentSetOfConstraints() )
sknowlton
03/18/2022, 1:59 PMconstraints
argument that it goes looking for this.constraints