在使用Spring-Data MongoDB嘗試將Object保存到mongo數據庫時,我得到了這個異常。如何在spring數據中使用@DocumentField來消除歧義mongoDB
Ambiguous field mapping detected! Both <child class field> and <parent class field> map to the same field name <field name>! Disambiguate using @DocumentField annotation!
我隱藏在子類中的字段,這是造成問題。但這對於我隱藏在超類中聲明的字段是至關重要的。我無法在任何地方找到@DocumentField註釋。我怎麼能在這裏繼續?還有其他解決方案嗎?
我有同樣的問題,因爲我想存儲在MongoDB中都和Neo4j的基本類型。你解決了這個問題嗎? – 2015-02-05 15:06:31