發表文章

目前顯示的是 1月 6, 2019的文章

Spring Data JPA Specification with MayToMany relation

圖片
0 I'm trying to use Specification to build a search criteria with Spring Data JPA. I have 2 entities @Entity public class User { @Id private Long userId; @ManyToMany @JoinColumn(name="locationId") @JsonIgnore private List<Location> locations; //getters and setters And Location public class Location { @Id private long locationId; @ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST, CascadeType.REMOVE, CascadeType.DETACH, CascadeType.REFRESH , mappedBy = "locations") @JsonIgnore private List<User> users; //getters and setters Now I would like to find all users with a given list of locations, so I'm trying to build the predicate. My problem is getting the relation table between the 2 entities... I'm trying in this way Root<Location> second = query.from(Location.class); Expression<Collection<Root>> userLocations = second.get("users"); return builder.and(builder.isMember(root, u...

Storing a value in Word client rather than the document

圖片
2 Is there any way to store a key/value pair in the Word client using the JS APIs which will be applicable to other documents as well? Something like the roamingSettings property which is available for Outlook APIs? office-js office-addins share | improve this question edited Nov 13 '18 at 9:48 asked Nov 12 '18 at 21:45 Mavi Domates 1,315 1 10 22 add a comment  |  2 Is there any way to store a key/value pair in the Word client using the JS APIs which will be applicable to other documents as well? Something like the roamingSettings property which is available for Outlook APIs? office-js office-addins share | improve this question edited Nov 13 '18 at 9:48 asked Nov 12 '18 at 21:45 Mavi Domates 1,315 1 10 22 add a comment  |  2 2 2 Is there any way to store a key/value pair in the Word client using the JS APIs which will...