我已经开始学习JPA,并且我了解了here属性的持久性。
但我不太明白
请举例说明,谢谢
更新
实施例: 有什么区别
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Movie {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private String title;
@Persistent
@Extension(vendorName="datanucleus", key="gae.unindexed", value="true")
private String imageType;
@Persistent
private Blob image;
//getter, setters
}
和
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Movie {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
private String title;
@Extension(vendorName="datanucleus", key="gae.unindexed", value="true")
private String imageType;
private Blob image;
//getter, setters
}