Spring JPA使用数据库时间戳进行插入
我正在使用SpringJPASpring JPA使用数据库时间戳进行插入,spring,jpa,Spring,Jpa,我正在使用SpringJPA @Column(name = "rec_cren_tm", insertable = false, updatable = false) private Timestamp recCrenTm; 使用数据库时间戳并正确插入 但在获取时,我得到的是null属性。下面是我使用的方法 @Transactional public interface IClaimRepository extends JpaRepository<Claim, Long> {
@Column(name = "rec_cren_tm", insertable = false, updatable = false)
private Timestamp recCrenTm;
使用数据库时间戳并正确插入
但在获取时,我得到的是null属性。下面是我使用的方法
@Transactional
public interface IClaimRepository extends JpaRepository<Claim, Long> {
@Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW)
List<Claim> findByLnId(String LnId);
@Transactional
公共接口IClaimRepository扩展了JpaRepository{
@事务性(只读=错误,传播=传播。需要\u新建)
列表findByLnId(字符串LnId);
我如何得到这个答案?这正是我想要的答案
但是此线程没有我正在寻找的解决方案您需要添加更多信息。例如,索赔实体的外观,您如何使用存储库。可能它为空,因为您获取的记录在数据库中为空。任何帮助都将不胜感激。