framework-one / di1

DI/1 - Inject One - is a very lightweight, convention over configuration, dependency injection (inversion of control) framework for ColdFusion / CFML.
http://di1.riaforge.org
104 stars 36 forks source link

0.1.6 - Implicit setters bug #17

Closed haylo75 closed 13 years ago

haylo75 commented 13 years ago

I'm referencing the sample app distributed with DI/1 0.1.6. /model/services/product.cfc has implicit setters enabled, so the userService property should be autowired a reference to /services/user.cfc. The example page dumps bf.getBean('userfish').product.getUserService() as undefined.

seancorfield commented 13 years ago

It works fine for me. Did you ?reload=true after updating to 0.1.6?

What CFML engine are you using? What exact version? What O/S etc?

haylo75 commented 13 years ago

Yes, in fact I restarted CF to be sure. I'm on ACF9.0.1 developer install, WinXP. I'll try again to be triple sure.

haylo75 commented 13 years ago

Ok, I restarted CF again, ensured ?reload=true was in my query string (overkill), cleaned out template and component caches, and still see userService as undefined. getBeanInfo doesn't show the setter in beaninfo.productservice.metadata.setters either.

Note: I made one change to application.cfc, which was to the extension point for the framework from org.corfield.framework to the local directory, where I placed a copy of framework.cfc from the 2.0beta FW/1 commit.

https://github.com/seancorfield/fw1/commit/5e03a0ae6d7762e81bed565ecf91753cbda2ec9d

haylo75 commented 13 years ago

I confirmed the same results on another ACF9.0.1 install, this box not having any flavor of either DI/1 or FW/1 on it before the test was conducted.

seancorfield commented 13 years ago

OK, I'll fire up ACF9.0.1 and see why it behaves differently to Railo...

seancorfield commented 13 years ago

Hmm, repro'd... odd... I'll investigate later today...

haylo75 commented 13 years ago

Tested and verified fixed on my end, thanks!

seancorfield commented 13 years ago

Thanx for the confirmation!