1
1 .- 만들기 개체 ID은 앱 엔진에서 새 개체를 만들 수 없습니다 (ID : 긴 타입)
// Allocate a key for the conference -- let App Engine allocate the ID
final Key<Conference> conferenceKey = factory().allocateId(profileKey, Conference.class);
// Get the Conference Id from the Key
final long conferenceId = conferenceKey.getId();
2 .-
// Create Conference
Conference conference = new Conference(conferenceId,userId,conferenceForm);
ID를 추가, objeto 만들기
3 .- 저장 개체 :
// Save Conference and Profile Entities
ofy().save().entities(profile,conference).now();
ofy().save().entity(conference).now();
4 .- 오류, 동일한 ID를 사용하여 배수 시간 (데이터 저장소 구글)
참고 : 같은 ANDROID_CLIENT_ID (릴리스 모드)로 만든 동일 객체
ID = 1 인 두 엔티티가 서로 다른 부모를 가지므로 올바른 키가 서로 다릅니다. 고유 한 전체 키 경로입니다. 이름/ID는 상위 범위에서만 고유합니다. – tx802
@ tx802 - 답변으로이 의견을 게시하십시오. 맞습니다. –