wukong-m2m / wukong-darjeeling

Darjeeling for WuKong
Other
20 stars 17 forks source link

The mapper do not prefer the native wuobject. #23

Closed wycc closed 11 years ago

wycc commented 11 years ago

Currently, the mapper will choice wuobject if it exists. However, if we have two devices matched by the locationtree, the mapper might select the device with virtual wuclass if its node_id is smaller. We should change the mapper to sort all candidates.

pencilcheck commented 11 years ago

I'm sorting the node.wuclasses() and node.wuobjects() using sorted by the virtual key. sorted is ascending by default.

That should do it. Will commit soon.

pencilcheck commented 11 years ago

Committed at f4a07015d9. Please check.