Fork me on GitHub

Hello 👋 is there a way to get the entity ID of a entity that was created using the clojure d/transact function? The function returns the tempids, but I need the actual entity IDs as I use these as unique identifiers and need a reference to a user I just created.


@lukasmoench1113 the return from transact includes a :tempids map that provides the mapping from the tempids to the final entity IDs


oh the return is actually the mapping 😅 thanks!


the :tempids key - there is an example of doing that just below the table

👍 3

I get the following error while trying to upgrade datomic cloud storage. Is it known?

The runtime parameter of nodejs8.10 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs12.x) while creating or updating functions.


@maxt Datomic cloud 569-8835 moved to using nodejs 10.x


you need to update to at least that version


but you should go to latest


Hey I'm trying to get a codebuild instance to be able to push up ions with datomic cloud. What permissions would the codebuild role need in order to run {:op 'push'} ?


@marshall I was able to upgrade my (all 44) lambdas using the aws cli tools, and then I could update my other compute node. But the one I started with, got stuck in UPDATE_ROLLBACK_FAILED , and then I can't rerun the upgrade. The rollback also fails, because the old version is ofcourse also using old nodejs, and is not allowed to proceed anymore.


@maxt can you please file a support ticket (<mailto:[email protected]|[email protected]>) Manually altering components of the system is not recommended and we may need to help you work through how to resolve that


upgrading the system overall (storage stack and compute stack) should have done it automatically for you


ok, I thought that part maybe wasn't automatic. Sure, I'll file a ticket, thanks.


I'm running across a strange problem. I have this in my schema (abbreviated):

{:db/ident :length/mm
  :db/valueType :db.type/double
  :db/cardinality :db.cardinality/one}
{:db/ident :dash-space/mm
  :db/valueType :db.type/tuple
  :db/tupleAttrs [:length/mm :length/mm]
  :db/cardinality :db.cardinality/one
  :db/unique :db.unique/value}
I never transact :dash-space/mm, but I do transact other things like:
{:radius/key unique-string-1 :length/mm 254.0}
{:length/key unique-string-2 :length/mm 254.0}
At some point (still more digging required) I get a unique constraint error on :dash-space/mm for the values of [254.0 254.0] . I can't say I really understand this problem. Getting rid of :dash-space/mm in the schema does eliminate it, but I assume there's something incorrect about the use of :db/tupleAttrs above, right?


you've created a composite tuple


your :`dash-space/mm` attribute is automatically created on any entity with either of the attrs in the :db/tupleAttrs vector


because you have it set to :db.unique/value if you ever try to transact data that would create a composite with the same value (254 254 in this case), you get the unique value error


if it were set to :db.unique/identity it would "upsert" instead


and if it were not set to any uniqueness, it would create a new entity


all that said, i'm not sure the purpose of making a composite tuple with a repeated attr


if you just wanted a tuple that would hold two arbitrary longs, unrelated to other attributes on that entity, you'd need to use :db/tupleTypes or :db/tupleType


instead of :db/tupleAttrs


Awesome @marshall! Thanks for the quick and clear response!


FYI, I didn't create this part of the schema so I can't say why it was done this way


do you know what the intended use/purpose of that attribute is?


I suspect it's trying to capture the length of the dash and space, and place a unique constraint on the pair of values (which are really references)


incidentally, using doubles as identity is pretty iffy; given the semantics of doubles / precision / comparison /etc, i'd definitely be wary of using them as any kind of identifier Thanks to @alexmiller for mentioning it


Oh, I'm aware, thanks. The values shouldn't have a unique constraint. This is definitely an error on our part


#rebl and Datomic dev-local are now free as part of Cognitect dev-tools

🎉 27