I have a product entity which is extended from DataType Entity. Like this:
@
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;
}
And I have ProductDao to retrieve products from the database
@Repository
public interface ProductDao extends DatastoreRepository<ProductEntity, Long> {
List<ProductEntity> findAll();
List<ProductEntity> findByCode(String code);
And when I make the query. The ID is null.
Click here to see the screenshot of the query
My Google Cloud datastore entity is like this: Click here to see the screenshot of datastore entity
I would like to retrieve Key Product id:5748154649542656 from this entity. Please help. Thanks in advances