Wednesday, February 10, 2016

[DataScript][Solved] Error: Expected number or lookup ref for entity id, got

When you are trying to use Map specification of Datomic's pull api and you got this error
Error: Expected number or lookup ref for entity id, got ....
This happens because you didn't specify schema for that data attribute. Schema is optional on DataScript but it is required in this case. Add this line to your database, the issue should be fixed
{:your-attribute1 {:db/valueType :db.type/ref}
 :your-attribute2 {:db/valueType :db.type/ref}}

No comments:

[PostgreSQL] How to create read-only standby replica (follower)

This link  and this link explain it really well and concise