Spring Data MongoDB findById not returning results
I have a Snozberry object that looks like this: { "id":"3cbdb746-561d-4e21-82e0-b7cfcad3a094", "thingId":"7cbfb7a6-763d-6ef1-271b-b2a0cfc2fa43", "stuffId":81, "bits":"WooHoo" } Java class (constructor, getter & setters omitted for brevity): @Document(collection="Snozberry") public class Snozberry { @Id private UUID id; private UUID thingId; private Long stuffId; private String bits; } The repository looks like: public interface SnozberryRepository extends MongoRepository<Snozberry,UUID>{ Snozberry findByThingId(UUID Id); Snozberry findById(UUID id); } In the MongoDB collection, the _id & thing
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.