-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHACL cannot constrain @id value #591
Comments
It's looking like the ;; brand new db
(-> db :novelty :post)
;;=>
#{#Flake [0 0 "@id" 1 -1 true nil]
#Flake [200 0 "@type" 1 -1 true nil]
#Flake [203 0 "http://www.w3.org/2000/01/rdf-schema#Class" 1 -1 true nil]}
;; but index-range can't find it
(async/<!! (query-range/index-range db :post = [const/$xsd:anyURI "@id"]))
[] |
Should this be allowed? What sort of validation would want to be done here? I am not sure this SHACL would be compatible with systems outside Fluree, as |
This question popped up on Discord where a user wanted to constrain In any case, I do think there is a bug under here in that our So we should make a decision about whether to support the use case, but I do think we should investigate the |
@dpetran I tried to check if this is still an issue using this code:
which resulted in: Is this what we would expect of these results and is the code that I wrote to test it correct? |
In order for a practical test I'd change the shape to check for an actual blank node:
I'm still not sure this can even work, especially now that we don't have id flakes. |
I get the same result when I use that |
The expected result is that the stage without an explicit |
@dpetran Should I go ahead and close this issue then? |
When creating a shacl shape to constrain the value of an
@id
, a new@id
flake is created instead.Instead of a proper shape, we end up with an internal representation that looks like this:
Where the
:path
sid is 1002 (or some new sid) instead of 0.Looking in the db novelty, this is the erroneous flake:
#Flake [1002 0 "@id" 1 -1 true nil]
- instead of creating a new flake it should just fall back to the base vocab identity flake#Flake [0 0 "@id" 1 0 true nil]
.The text was updated successfully, but these errors were encountered: