0
votes

I'm doing some TDD with a ColdFusion ORM application so I'm letting the application.cfc in my tests directory so I'm setting dbcreate="update" so the tests will create the database tables. Every time I change a model's method and re-run my tests I get the following error:

Mapping for component models.user.User not found.

If I restart the server the error goes away, however this is a terrible workflow so I'm looking for a better way to fix this problem.

1
have you tried dbcreate=dropcreate? - Henry
That seems to work, but it feels kind of like using a sledgehammer to pound in a nail approach. To me this seems like a bug in CF9. As this app gets bigger and bigger I wonder if the tests will get slow to a point where the team stops writing them as they should. If you want to turn you comment into an answer I'll accept it since it's likely that is the only approach that will work at this point. - bittersweetryan

1 Answers

1
votes

have you tried dbcreate=dropcreate?

From my experience, update or dropcreate might fail for the first time, but if you ormreload again, it might just work.