1
저는 JDO와 GAE를 배웠고 자신에 대해 매우 고심했습니다.JDO에서 자식 개체를 고유하게 식별하고 가져 오는 방법
난 그냥
public class Article {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
...
}
이제 부모를 가진 할 필요가 없어 없었다 :
public class ArticleCollection {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
private long count
private Set<Article> articles;
}
그러나이 작업을 수행 한 후, 다음 코드는 ID로 기사를 가져 오기 위해 더 이상 작동합니다. 객체를 고유하게 식별하는 방법은 무엇입니까?
Article article = (Article)pm.getObjectById(KeyFactory.createKey(Article.class.getName(), id));
도움이 되었습니까?
고마워, 어디서나이 정보를 찾을 수 없었다 !!! +1 – Jacob