I'm upgrading to the latest Coldbox 6 and I am hav...
# box-products
c
I'm upgrading to the latest Coldbox 6 and I am having an issue injecting my models see below
Copy code
property name="salesCFC" inject="sales";
property name="salesReport" inject="reports.sales";
This worked in v5 but moving into v6 I get this error.
Copy code
The target 'handlers.sales' requested a missing dependency with a Name of 'salesReport' and DSL of 'reports@sales'
It seems to be injecting reports.sales (which "reports" is simply a subfolder of models) into salesCFC and thats not what is supposed to happen. I haven't done anything with wirebox yet, but I assume there was something I was supposed to do there.
b
@Cavan Vannice Just to be clear, your code injects
reports.sales
but the error message says it can't find
reports@sales
?
c
I put in the wrong error. the issue is the reports.sales
b
It seems to be injecting reports.sales (which "reports" is simply a subfolder of models) into salesCFC and thats not what is supposed to happen.
I don't follow-- that's exactly what I would expect to happen
c
salesCFC should point to models/sales
b
Sorry, this is confusing
c
It is going to models/reports/sales
b
We're talking about the
salesreport
dependency I thought
but now you're talking about a different injectino
Which one are we troubleshooting?
c
salesCFC
b
BUt that's not what the error message was talking abouit
Copy code
The target 'handlers.sales' requested a missing dependency with a Name of 'salesReport' and DSL of 'reports@sales'
Specifically
dependency with a Name of 'salesReport'
That shouldn't be related to your
SalesCFC
injection
c
Ignore that first error
Copy code
Neither the method getDocumentCustomer was found in component models.reports.sales nor was there any default method with this name present in any of the implementing interface.
b
That's a differnt thread
You're mixing threads here
I already replied with another question there
c
Ok, close this one out, I accidently copied the wrong error
b
👍