Reputation: 1087
Why does this not work in ColdFusion with ORM? I don't get any error but getval2() is blank
property name="ID" type="string" fieldtype="id" generator="guid";
property name="val1" type="string" ormtype="string" persistent=true;
property name="val2" type="any" persistent=false default="";
public statsEntity function init(){
variables.val2= this.getval1();
return Super.init();
}
what I think should happen is getval2() should be the value of val1.
Any ideas why this is not the case?
ORMExecuteQuery("from myTable")
Upvotes: 2
Views: 421
Reputation: 33625
Not sure I understand correctly, but init() only runs on new enitity so will NOT work here try postLoad() not init().
Upvotes: 3