gpt4 book ai didi

java - Google App Engine 数据存储区支持哪些数据类型?

转载 作者:塔克拉玛干 更新时间:2023-11-01 22:03:20 25 4
gpt4 key购买 nike

我知道如何在 google BigTable 中制作表格。对此我有一个疑问。google BigTable 支持哪些数据类型。

最佳答案

引用Class and Field Annotations来自 Using JPA with App Engine 的部分:

Fields of the data class that are to be stored in the datastore must either be of a type that is persisted by default or expliclty declared as persistent. You can find a chart detailing JPA default persistence behavior on the DataNucleus website. To explicitly declare a field as persistent, you give it an @Basic annotation:

import java.util.Date;
import javax.persistence.Enumerated;

import com.google.appengine.api.datastore.ShortBlob;

// ...
@Basic
private ShortBlob data;

The type of a field can be any of the following:

  • one of the core types supported by the datastore
  • a Collection (such as a java.util.List<...>) of values of a core datastore type
  • an instance or Collection of instances of a @Entity class
  • an embedded class, stored as properties on the entity

定义和使用EmailPhoneNumber作为数据类型,为它们创建实体并将它们映射为 @OneToOne 或制作它们 @Embeddable .

关于java - Google App Engine 数据存储区支持哪些数据类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2711231/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com