Is this possible? Haven't seen much discussion on it.
Sure! It works great from my experience. Here's an example entity:
@Entity @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public class PingerEntity { // ID @Id @Getter @Setter @GeneratedValue(strategy = GenerationType.AUTO) private Long id; // USER @Getter @Setter @ManyToOne(fetch = FetchType.LAZY, optional = false) private UserEntity user; // URL @Getter @Setter @Basic(optional = false) private String url; /** * The number of seconds between checks */ @Getter @Setter @Basic(optional = false) private int frequency; @Getter @Setter @Basic(optional = false) @Enumerated(EnumType.STRING) public MonitorType monitorType; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With