Created
March 20, 2019 08:29
-
-
Save davidsf/5247895720da5754133b8a5b6279b94e to your computer and use it in GitHub Desktop.
Name collision handlers vs model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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