title: Query using bigint attribute return empty for certain values
body: <p>I created a minimal entity with one attribute of bigint type, my problem is that the query fail for certain values; this is the  schema:</p>
  
  <pre><code>  [{:db/ident :home/area,
      :db/valueType :db.type/bigint,
      :db/cardinality :db.cardinality/one,
      :db/doc "the doc",
      :db.install/_attribute :db.part/db,
      :db/id #db/id[:db.part/db -1000013]}]
  </code></pre>
  
  <p>I inserted a sample value:</p>
  
  <pre><code>(d/transact (d/connect uri2)
              [{
                :db/id #db/id[:db.part/user]
                :home/area 123456789000000N}
               ])
  </code></pre>
  
  <p>And confirmed that It was created by using the datomic console. It happens that the following query doesn’t return the entity previously inserted, as expected:</p>
  
  <pre><code>(d/q '[
         :find ?e
         :in $ ?h
         :where
         [?e :home/area ?h]]
       (d/db (d/connect uri2))
       123456789000000N
       )
  ;;--- #{}
  </code></pre>
  
  <p>Maybe I’m missing something in the way the value  is expressed. Another test using a different value like 100N for the attribute :home/area returns the correct answer:</p>
  
  <pre><code>(d/transact (d/connect uri2)
              [{
                :db/id #db/id[:db.part/user]
                :home/area 100N}
               ])
  
  (d/q '[
         :find ?e
         :in $ ?h
         :where
         [?e :home/area ?h]]
       (d/db (d/connect uri2))
       100N
       )
  ;;-- #{[17592186045451]}
  </code></pre>
  
  <p>Also works fine with the value 111111111111111111111111111111111111N which is confusing to me.</p>
  
  <blockquote>
    <p>Datomic version: "0.9.5390" java version "1.8.0_05" Java(TM) SE
    Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit
    Server VM (build 25.5-b02, mixed mode) MySQL as Storage service</p>
  </blockquote>
  
  <p>Thanks in advance for any any suggestions.</p>