I'm wondering if there is a way with Apache Cayenne to use their .setTo method for setting relationships without it pulling the object one at a time each time the method is called. I'm working with several thousands of rows of data and it having to query the object each time a relationship is set eats a few milliseconds which adds up to several minutes with this large of a data set.
I've tried digging through their documentation, but a number of it is abstracted away which makes it hard to find in their exactly what I'm looking for. Would appreciate any tips!