Closed (fixed)
Project:
Migrate
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
27 Jun 2011 at 20:13 UTC
Updated:
16 Jul 2011 at 16:21 UTC
Jump to comment: Most recent file
Unless we create a child class per migration class for the migration destination, we get the same count number on every migration because the cache id is __METHOD__, that always output MigrateSourceMSSQL::count
This patch use the md5 of MigrateSourceMSSQL::countQuery as the cache ID for the count query.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | source_cache-1201762-2.patch | 14.82 KB | mikeryan |
| 0001-Use-a-better-cache-id-on-MigrateSourceMSSQL-count.patch | 1.42 KB | marvil07 |
Comments
Comment #1
mikeryanI've had in the back of my mind implementing source count caching directly in MigrateSource, rather than dealing with it (or not) in each source plugin. Think I'll give it a shot, making sure I take care of this problem as I do it...
Comment #2
mikeryanOK, the tricky part was not breaking any existing code (i.e., if anyone has implemented their own source or list classes). I haven't committed yet, please give it a try and see if it works for you on MS SQL. Notes:
Comment #3
mikeryanOops, don't have time to redo the patch right now, but "abstract public function computeCount();" in source.inc should be commented out, otherwise source classes outside of Migrate itself will break...
Comment #4
mikeryanCommitted for D7, still needs to be backported to D6.
Comment #5
mikeryanCommitted for D6.