0
我試着去把一個blob鍵爲實體的屬性和Im receieving以下錯誤:存儲對BLOB的引用在實體
/api/get/tmr
java.lang.IllegalArgumentException: The string property st has a value that is too long. It cannot exceed 500 characters.
我的代碼是:
BlobKey k;
k=BlobUtil.pBE(d,DT,"st");
DT.setProperty("count",count);
Object O;
O = DT.getProperty("st");
String cl = O.getClass().getName();
String Cl = O.getClass().getCanonicalName();
log.info(" st property |"+DT.getProperty("st")+"|"+cl+"|"+Cl+"|");
datastore.put(DT);
錯誤來自最後一行:
TMComputation TMR: st property |<BlobKey: AD8BvulOBPut_iHAT4caaMyjl_X0qhnd5gT7IIP-UI-Q7wuY-XS2kuT1yzKWUo98M9YA5dld_3LG7CEAIER5La6x-Gz7zAAmnlGakhgHydkIFAujBYZ3ffRtya3ECcehqlHQDYdyqQVeS2ZmtbpfL4hUT3pTNiBCwJOIeFjO2qZGDycVSe_VJIddH87vuyH2R0ZrU_jxDtLEJ2pbtVaxnC96AS8BBSTzlKtNVjNilfNAUydmDwXqknmN4jOZLIPKhivUnv_ohEHjWo8J-CJsvHZcZQnqoIQBR9yF6JvWHWqxbkMDSvUkePAYXywcsziNn2t76dVh8jKnSGAQkU2FbufgMBKkSCASakcnpz76P8RHWn3VcYyflHQXLSXNLUmuiK-yPv9QR6NXGQ8Uyy2v4Bl9JzHP5v1PnzJDCc3Zwj9ytMeww7K_nyQuXJZw9J8oQpSitXSKmdqHVQHvbtSxFzZmlU59WyEwYgoW1ID0nRpiYwh30QrIXAQrm0AHdcN-ji_D44xSmP4dm3eFZQ2iglRz-71C_Wanbw7ZYmMrNge7qErHaemeIBXePWx5tLdN7jfaLBA2ho3V6_o2yI2dFseVxzGMfle23GTuSusvuzBA_DfJYFyFjVj0htMCbadMyr3UoP2umPHFPA-F-oD2o5i7tsLkjoIAWV5njbBsPtUYq3_66r1jomE3bbEYnV5KvnM4vEEyd2g_1_XCg-476vB9AaKoaxLQfZWPL5pLu5mIqXJYIcimUzOoxLH6deEmU08N7476CjjpouIMPdlRxCu_HBsf_0LMLrkQpuRmLxq5Z-lhtfEfYdAUFdSZfa-evaGw8EzVitAe1RaUrnbTv8p-TySJG-H4zrHslv-84PY4grKsNsCTALC0ogCFbCAmyplQikYGYG0Z08bq7RSDvBfcfKJwAcTHCkbkQ9aIId3nKP8LfNzTwR3DsofBrT5xcyJULZoARwktmT13-L_qUUHwtzz4Wt5Z7A>|com.google.appengine.api.blobstore.BlobKey|com.google.appengine.api.blobstore.BlobKey|
這表明st屬性包含blob鍵而不是字符串。
的文檔「屬性和值類型」的文件說,我可以存儲的BlobKey,那麼,爲什麼給我約一個字符串錯誤? – lv47