[
https://issues.apache.org/jira/browse/JENA-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15055960#comment-15055960
]
Osma Suominen commented on JENA-1092:
-------------------------------------
If I use this update query instead, which in my understanding is equivalent but
avoids the WITH clause, I get the correct result i.e. the new triple {ex:s2
ex:p2 ex:o2} in the ex: graph.
{noformat}
PREFIX ex: <http://example.com/>
INSERT { GRAPH ex: { ex:s2 ex:p2 ex:o2 }}
WHERE { GRAPH ex: { ?s ?p ?o }}
{noformat}
> WITH statement doesn't work
> ---------------------------
>
> Key: JENA-1092
> URL: https://issues.apache.org/jira/browse/JENA-1092
> Project: Apache Jena
> Issue Type: Bug
> Affects Versions: Jena 3.0.1
> Environment: Ubuntu 12.04
> java version "1.8.0_66"
> Reporter: Osma Suominen
>
> I found a possible problem with WITH statements in SPARQL Update queries.
> They do not seem to affect the INSERT clause in the expected way. The
> behaviour appears to have changed since Jena 3.0.0.
> To reproduce:
> 1. Start Fuseki 1.3.1:
> ./fuseki-server --update --mem /ds
> 2. Create a triple in the <http://example.com/> graph:
> {noformat}
> PREFIX ex: <http://example.com/>
> INSERT DATA { GRAPH ex: { ex:s ex:p ex:o }}
> {noformat}
> 3. Run an update query using WITH:
> {noformat}
> PREFIX ex: <http://example.com/>
> WITH ex:
> INSERT { ex:s2 ex:p2 ex:o2 }
> WHERE { ?s ?p ?o }
> {noformat}
> 4. Check what you end up in the <http://example.com/> graph:
> {noformat}
> PREFIX ex: <http://example.com/>
> SELECT * WHERE { GRAPH ex: { ?s ?p ?o }}
> {noformat}
> Result:
> {noformat}
> ----------------------
> | s | p | o |
> ======================
> | ex:s | ex:p | ex:o |
> ----------------------
> {noformat}
> I would expect there to be the other triple { ex:s2 ex:p2 ex:o2 } too, but
> apparently that ends up in the default graph instead.
> When using Fuseki 1.3.0 I get both triples in the <http://example.com/>
> graph, which I think is the correct behaviour.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)