我正在尝试使用 orientdb 数据库中的 id 字段获取记录,但它没有返回记录。
这是记录(它适用于简单的选择):
orientdb {baasbox}> select from _bb_order
----+-----+-----+------+------+------+-------+--------+---------+---------+---------+----- ----+---------+---------+---------+---------+-------------
# |@RID |price|_links|_allow|_audit|_author|verbatim|timestamp|audioLeng|orderURI |transcrip|_creation|id |fileId |feedbackI|status
----+-----+-----+------+------+------+-------+--------+---------+---------+---------+---------+---------+---------+---------+---------+-------------
0 |#22:1|0 |#11:9 |[1] |#3:7 |k |false |false |60 |TC0448...| |2014-0...|249373...|8a9ca9...|0540df...|Order rece...
----+-----+-----+------+------+------+-------+--------+---------+---------+---------+---------+---------+---------+---------+---------+-------------
1 item(s) found. Query executed in 0.003 sec(s).
当我从 _bb_order 模式中选择 id 时,我可以获得记录。
orientdb {baasbox}> select id from _bb_order
----+-----+------------------------------------
# |@RID |id
----+-----+------------------------------------
0 |#-2:1|24937309-9189-484d-b406-6302b2ce9b6f
----+-----+------------------------------------
1 item(s) found. Query executed in 0.003 sec(s).
但是,当我在“id”属性上使用 where 子句时,我无法恢复记录。
orientdb {baasbox}> select from _bb_order where id="24937309-9189-484d-b406-6302b2ce9b6f"
0 item(s) found. Query executed in 0.001 sec(s).
当我使用其他属性(如 fileId)时,我可以获得记录。
orientdb {baasbox}> select from _bb_order where fileId="8a9ca9d2-bbe2-4326-aa2b-bad5f2032fbd"
----+-----+-----+------+------+------+-------+--------+---------+---------+---------+---------+---------+---------+---------+---------+-------------
# |@RID |price|_links|_allow|_audit|_author|verbatim|timestamp|audioLeng|orderURI |transcrip|_creation|fileId |id |feedbackI|status
----+-----+-----+------+------+------+-------+--------+---------+---------+---------+---------+---------+---------+---------+---------+-------------
0 |#22:1|0 |#11:9 |[1] |#3:7 |k |false |false |60 |TC0448...| |2014-0...|8a9ca9...|249373...|0540df...|Order rece...
----+-----+-----+------+------+------+-------+--------+---------+---------+---------+---------+---------+---------+---------+---------+-------------
1 item(s) found. Query executed in 0.002 sec(s).
确认Id字段在代码中存储为String。
关于为什么会发生这种情况的任何想法?