Closed (fixed)
Project:
Migrate
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 Dec 2011 at 18:20 UTC
Updated:
21 Dec 2011 at 19:10 UTC
If you have registered several dynamic migrations which all have the same query (only differing in a parameter to the query), if you set cache_counts to TRUE all the migrations will show the same count, of the first one to be counted. This is because the cache key is derived from (string)$this ($this being the source class), which is the query string (via __toString()). The migration arguments should be taken into account. It may actually be nice to work the arguments into __toString(), so they can be viewed in the UI.
Comments
Comment #1
mikeryanWell, so much for that idea - the source class has no idea what the migration is, and thus what the parameters are. Solved this by added a 'cache_key' option to the source class constructor, so the caller can explicitly set it to something unique: