Im building my first module, I just got into an issue where I do not
know how to pass an init argument to a model inside my module project.
I got this structure:
/modules/cart/ModuleConfig.cfc
/modules/cart/models/cart/CartDAO.cfc
/modules/cart/models/cart/CartGateway.cfc
/modules/cart/models/cart/CartService.cfc
In my ModuleConfig.cfc I got these lines:
<cfset
binder.map("cartDAO@cart").to("#moduleMapping#.model.cart.CartDAO") />
<cfset
binder.map("cartGateway@cart").to("#moduleMapping#.model.cart.CartGateway") /
<cfset
binder.map("cartService@cart").to("#moduleMapping#.model.cart.CartService") /
All is working "fine", but the I got a required argument (dsn) inside
the constructors in my DAO and Gateway models which I have try to
pass on but I just can't.
If I enter the dsn myself all works, that measn I just need to find
the way to pass that argument when I bind them, correct?
Any ideas... I ran out!
Felipe Serrano