Hi,
I'm trying to get Spring to generate a MongoDB query method which looks to match within an array:
But the generated query looks for cab.passengers._id, rather than cab.passengers.$id, as it should for the DBRef to resolve correctly:Code:public class Cab { @DBRef List<Passenger> passengers; } public interface CabRepository { Cab findByPassengersId(String id); }
2012-08-03 14:10:39,608 [SimpleAsyncTaskExecutor-1] DEBUG org.springframework.data.mongodb.repository.query. MongoQueryCreator - Created query Query: { "passengers._id" : "C"}, Fields: null, Sort: null
What am I doing wrong?
Thanks,
Ben


Reply With Quote