Dec 18, 2008

dm 0.9.8 breaks YAML.dump

If you are wondering why your code stop working on dm 0.9.8, this could be one of the reason:
The DM 0.9.8 breaks the after you do any operation on the result Array:
z1 = Zoo.all(:condition.....)
z1.to_yaml # this OK
z2 = Zoo.all(:condition...)
z2.to_yaml # this OK
z3 = z1 + z2
z3.to_yaml # bam!. ERROR
view raw gistfile1.txt hosted with ❤ by GitHub


So the workaround could be:
1. Issue only one query to get all you need
or
2. If you can not do 1, then you have to get all the ids, then use (:id.in => ids) to make it working.

Hope this could save you sometime to figure out the very strange error info.

Here is the ticket on light house.

No comments: