I'm not sure what your final implementation looks like, but be careful about moving to longs from ints. It's not a one-line change. If you're just parsing longs, then casting them down to ints to use as dimensions in a vector or matrix, it won't work correctly at all. You'll be truncating long IDs to ints, and then trying to interpret them as long IDs later, but they won't be valid IDs.
Is that what you did? then I could imagine recommendations being all wrong.
If you have long IDs, you will need the steps you see in the 'item' implementation. In particular you need the step that generates and saves the long <-> int mappings.