我有一个实体,其中有一个字段用于保存实体更新的日期。我正在使用下面的注释:
@Temporal(TemporalType.TIMESTAMP)
@UpdateTimestamp
@Column(name = "updated_at", nullable = true)
private Date updatedAt;
Run Code Online (Sandbox Code Playgroud)
我想要updatedAt作为null默认值,但我的默认值是创建实体时的同一日期。
在我的@Service班级中,我像这样保存实体:
visitorRepository.saveAndFlush(visitor)
Run Code Online (Sandbox Code Playgroud)
有没有办法使用@UpdateTimestamp将我的updatedAt保存为null作为默认值?
我有一个 Google 地图 API 密钥,我想用它来使用 Xamarin Forms 在我的 Android 应用程序和 iOS 应用程序中显示地图。您会使用哪个库来减少两个操作系统上的冲突?
google-maps xamarin.ios xamarin.android xamarin xamarin.forms
annotations ×1
audit ×1
google-maps ×1
hibernate ×1
java ×1
spring-boot ×1
xamarin ×1
xamarin.ios ×1