Does `queryExecute` no longer return the generated...
# lucee
r
Does
queryExecute
no longer return the generatedKey? I am not seeing the value returned in query results
I am running 5.3.10. I will try updating
j
are you using the result method shown here? https://stackoverflow.com/a/67713970/1026263
r
I was specifying the results using query options:
Copy code
queryExecute("INSERT INTO SerializedPosts (posts_id, data) values(uuid_to_bin(:posts_id), :data)", {
        'posts_id': { value: "44749a86-06df-11ee-9ad6-4aabbc1875a4", cfsqltype: "cf_sql_varchar"},
        'data': {value = "{}", cfsqltype: "cf_sql_varchar"}
    },
    {
        datasource: "renegade",
        result: "results"
    });

    dump(results);
Same code I would use in ACF.
j
okay, yeah, that looks right. just making sure you knew how the result stuff (supposedly) works.
👍 1
r
That is a pretty big hole 😕
j
yup, and a pain to work around, if it comes to that.
r
Specially in a chained transaction that relies on the generated key...
👍 1
woosah
Ok, I will keep digging. Thanks Jamie
So it looks to be the correct behavior. I am not using an auto-incrementing key
I am not see the generatedKey being returned from ACF either
Guess I was trying to be too clever
j
was it another kind of auto-generated key or was there no auto-generated key at all?
r
I am generating the id (MySQL) using
uuid()
as a default
Might need to rethink that one
j
generated on the db side?
r
Correct
👍 1
Looks like
createGUID()
creates a valid guid in mysql. I can make that work. Thanks again