craue / CraueGeoBundle

Doctrine functions for calculating geographical distances in your Symfony project.
MIT License
124 stars 15 forks source link

Bug in DataFixture #2

Closed jeroenvrooij closed 12 years ago

jeroenvrooij commented 12 years ago

Hi,

I found a bug in CraueGeoBundle/Doctrine/Fixtures/GeonamesPostalCodeData.php. The if-statement at the end of the for-loop (line 71) checks if the batchsize is reached. If the batchsize (1000) is reached the manager gets flushed and cleared. However, if the last batch is not as big as the batchsize the manager doesn't get flushed.

I found it very suspicious that Holland has exactly 5000 postalCodes. When adding an extra flush after the for-loop I have 5314 postalCodes which seems more plausible ;)!

Kind regards, Jeroen van Rooij

craue commented 12 years ago

Well spotted! Strangely, I had 7785 entries for Germany which didn't look suspicious. With the fix, it's 8313. Thank you for reporting this.

jeroenvrooij commented 12 years ago

Well, that's strange indeed. Thank you for your reply and (very fast) fix!

2012/4/4 Christian Raue < reply@reply.github.com

Well spotted! Strangely, I had 7785 entries for Germany which didn't look suspicious. With the fix, it's 8313. Thank you for reporting this.


Reply to this email directly or view it on GitHub: https://github.com/craue/CraueGeoBundle/issues/2#issuecomment-4951518

craue commented 12 years ago

Must be because duplicate entries are filtered out.