Query doesnt return whats is expected, UID Problem

There is my call.

  1. ref:Yv-iNRAAACMAIlUm
  2. q:[[:d = at(document.type, "destination")][:d = at(my.destination.uid, "trump_national_doral")]].

There is my response:

Like you saw. The uid does'nt fit and its causing a lot of problem.
What I am guessing, that I probably renamed one of this ID and prismic match with the old ID ?
If I am looking at the history, thats what happen, The id change in time, but prismic answers with the old one.

Hey @mike.whittom, could you send us the URL of your repo so we can test it on our end?

I think thats the url you need : https://user-app.prismic.io/api/v2

Hey @mike.whittom, what happened there is that the document with the UID of "atelier_plays_mujeres_golf_resort", used to be "trump_national_doral"(6 months ago, according to the document history).

The document you're looking for has almost the same UID but with hyphens instead of underscores: "trump-national-doral"

Thank you for your response.
Yeah,it was a mistake for me to put hyphens instead of underscores. But I cannot use trump_national_doral anymore because it was already used one time?
I also can move forward with this issue because I rework my application and change my bad pattern to use a more correct one and that fixes my problem earlier.

Thank you very much for your time, it's really appreciated. I would like to understand why also trump_national_doral return same result as atelier_plays_mujeres_golf_resort

If you wanted to reuse the old UID you need to follow these steps:

Of course, I can explain why this happens. According to the history of your documents, the doc with the atelier_plays_mujeres_golf_resort UID, used to have this UID 6 months ago: trump_national_doral. That's why you can still find it in the API with its first UID.