Skip to content

Instantly share code, notes, and snippets.

@davidsf
Created March 20, 2019 08:29
Show Gist options
  • Save davidsf/5247895720da5754133b8a5b6279b94e to your computer and use it in GitHub Desktop.
Save davidsf/5247895720da5754133b8a5b6279b94e to your computer and use it in GitHub Desktop.
Name collision handlers vs model
handlers/product.cfc:
component{
function index( event, rc, prc ){
prc.product = EntityLoadByPk( 'product', 1);
dump(prc.product.user_id );
}
}
Error: Component [product] has no accessible Member with name [USER_ID] enable [trigger data member] in admininistrator to also invoke getters and setters
handlers/product2.cfc:
component{
function index( event, rc, prc ){
prc.product = EntityLoadByPk( 'product', 1);
dump(prc.product.user_id );
}
}
Works ok!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment