2013-11-15 65 views
1

突然從'昨天'嘗試刪除實體時,'class_cast'無法刪除錯誤。什麼可能導致這個?這個錯誤是通過Javascript API和App Services Portal發生的。幫幫我!!從JavaScript API調用Usergrid無法刪除實體錯誤

錯誤響應:當您嘗試刪除,並且具有其他實體的連接實體

{ 
    "error": "class_cast", 
    "timestamp": 1384530808497, 
    "duration": 0, 
    "exception": "java.lang.ClassCastException", 
    "error_description": "org.usergrid.persistence.cassandra.ConnectedEntityRefImplcannotbecasttoorg.usergrid.persistence.cassandra.ConnectionRefImpl" 
} 

回答

0

,拋出此異常。在刪除實體之前,您必須刪除連接。

如果創建從這個實體的連接,你可以試試這個:

FOREIGN_ENTITY.disconnect("<CONNECTIONNAME>", entity, function(err, data){ 
    if(err){ 
    console.error(data.error_description); 
    } else { 
    entity.destroy(...); 
    } 
}); 
1

截至2015年,實體之間的連接:

entity.disconnect("<CONNECTIONNAME>", FOREIGN_ENTITY, function(err, data){ 
    if(err){ 
    console.error(data.error_description); 
    } else { 
    entity.destroy(...); 
    } 
}); 

如果連接是從所連接的實體制造將不再阻止他們的刪除,這應該不再是一個問題。