Ich habe ein seltsames Problem für die Frühjahr Daten mongodb Repositories .. Ich möchte ein Feld von meinem findAll
Anfrage ausschließen. Wie kann ich das erreichen?Frühling Daten mongodb Repository findAll Feld Ausschluss
Das funktioniert perfekt:
@Query(fields = "{'objectContentAsJson':0}")
Page<ObjectHistory> findByObjectIdAndServiceIgnoreCase(String objectId, String service, Pageable pageable);
Aber keine Chance für findAll
:
@Query(fields = "{'objectContentAsJson':0}")
Page<ObjectHistory> findAll(Pageable pageable);
Dies wirft:
Verursacht durch: org.springframework.data.mapping.PropertyReferenceException : No Immobilie gefundenAlle gefunden für Typ Obje ctGeschichte! bei org.springframework.data.mapping.PropertyPath. (PropertyPath.java:75) bei org.springframework.data.mapping.PropertyPath.create (PropertyPath.java:327) bei org.springframework.data.mapping .PropertyPath.create (PropertyPath.java:307) bei org.springframework.data.mapping.PropertyPath.from (PropertyPath.java:270) bei org.springframework.data.mapping.PropertyPath.from (PropertyPath.java : 241) bei org.springframework.data.repository.query.parser.Part (Part.java:76)
Aber ich nicht, es bekommen, funktioniert es wie ich auf der anderen Funktion –
Danke für die Hilfe sowieso! –
Im anderen Fall ist die Abfrage vom Methodennamen ableitbar. –