afs commented on issue #1768:
URL: https://github.com/apache/jena/issues/1768#issuecomment-1443295792
Thanks. #1769 fixes that.
A workaround is to not use `model.add(Statement)` but instead
`model.add(subj, prop, obj)`
```
Statement statement2 = ResourceFactory.createStatement(
model.createResource(statement1),
model.createProperty("http://dev.de/default#atLocation"),
model.createResource("http://dev.de/default#Berlin")
);
model.add(statement2);
```
becomes
```
model.add(
model.createResource(statement1),
model.createProperty("http://dev.de/default#atLocation"),
model.createResource("http://dev.de/default#Berlin")
);
```
The bug is the `model.add(Statement)` mis-handling the statement components;
they need to be associated with the model so `listProperties` etc work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]