coldfusion - super() type functionality on ORM CFC -
when use cf9's orm feature , generate explict setter orm cfc, there anyway call default funcitionailty of orm cfc after have done work needed in method. example looking this. obviosuly code not run , , super wrong concept since orm cfc isnt inherting anything, thats type of functionality looking for.
public void setmovie(string movie){ if(movie == "inception"){ ormcfc.super().setmovie("greatest movie ever made") }else{ ormcfc.super().setmovie(movie) }
in model cfc orm can specify additional "decorator" functions.
component persistent="true" table="movie" schema="dbo" output="false" { /* properties */ property name="movieno" column="movieno" type="numeric" ormtype="double" fieldtype="id" ; property name="name" column="name" type="string" ormtype="string" ; /* decorator */ public void function setmovie(name) { if(name == "inception"){ setname("greatest movie ever made") }else{ setname(name) } } }
otherwise if need (using example) setmovie() need entityload or create new entity set value to.
Comments
Post a Comment