0
我用xml-rpc做請求。通過Java的Odoo請求
List singleTasks = Arrays.asList((Object[]) objClient.execute("execute_kw",
Arrays.asList(db, uid, password, "project.task", "search_read",
Arrays.asList(Arrays.asList(
Arrays.asList("active", "=", true))),
new HashMap() {{
put("fields", Arrays.asList("display_name", "total_hours", "project_id", "user_id"));
}}
)));
這不幸返回以下結果:
[{PROJECT_ID = [Ljava.lang.Object; @ 759ebb3d,USER_ID = [Ljava.lang.Object; @ 484b61fc,ID = 23,total_hours = 11.0,display_name = TEST}]
我不知道如何使用或轉換Ljava.lang.Object,這是什麼意思,我怎麼得到真正的ID?
我認爲它與該領域的類型有關,因爲它可以是one2many,many2one或many2many領域。