我需要一些帮助
我正在使用gae,datastore和jdo
国家1 - N部门;部门1 - N省,无主关系,知道省的国家数据
实体派:
@PersistenceCapable(detachable = "true")
public class Pais implements Serializable{
/**
*
*/
private static final long serialVersionUID = -4204342672595368670L;
@PrimaryKey
@Persistent
private String idPais;
@Persistent
private String codigo;
@Persistent
private String descripcion;
@Persistent
private Long version;
@NotPersistent
private String operacion;
@NotPersistent
private String codePais;
实体Departamento:
@PersistenceCapable(detachable = "true")
public class Departamento implements Serializable{
private static final long serialVersionUID = 2029238048901900816L;
@PrimaryKey
@Persistent
private String idDepartamento;
@Persistent
private String codigo;
@Persistent
private String descripcion;
@Persistent
private Long version;
@Persistent
@Unowned
private Pais beanPais;
@Persistent
private String codePais;
@NotPersistent
private String operacion;
@NotPersistent
private String codeDepartamento;
Entity Provincia
@PersistenceCapable(detachable = "true")
public class Provincia implements Serializable{
/**
*
*/
private static final long serialVersionUID = -2560617366920790922L;
@PrimaryKey
@Persistent
private String idProvincia;
@Persistent
private String codigo;
@Persistent
private String descripcion;
@Persistent
private Long version;
@NotPersistent
private String operacion;
@NotPersistent
private String codeProvincia;
@Persistent
private String codeDepartamento;
@Persistent
@Unowned
private Departamento beanDepartamento;
@NotPersistent
private String codePais;
查询允许我查看国家/地区数据,访问分区 JDO