我有一个从 DataType Entity 扩展而来的产品实体。像这样:
@
Entity(name = "Product")
@Getter
@Setter
public class ProductEntity extends DataTypeEntity{
public Date created;
String name;
String url;
String code;
String description;
String fixedCost;
}
@Getter
@Setter
@NoArgsConstructor
public class DataTypeEntity {
@Id
public Long id;
public Date created;
public Date lastUpdated;
}
我有 ProductDao 从数据库中检索产品
@Repository
public interface ProductDao extends DatastoreRepository<ProductEntity, Long> {
List<ProductEntity> findAll();
List<ProductEntity> findByCode(String code);
当我进行查询时。标识为空。
我的谷歌云数据存储实体是这样的: 点击这里查看数据存储实体的截图
我想从该实体中检索 Key Product id:5748154649542656。请帮忙。提前感谢