-
Notifications
You must be signed in to change notification settings - Fork 14
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
Literal languages are lost on repeated #<<
calls
#245
Comments
This apparently affects every version, at least since 0.7.x. |
Fixes the bug in #245 causing literal languges to be lost when setting values to an existing `Relation` (including self).
Fixes the bug in #245 causing literal languges to be lost when setting values to an existing `Relation` (including self).
The vocabulary classes don't retain language. It keeps strings or symbols, which are interpreted according to the range of the property they use. Language has never been supported in the Vocabulary class definitions. edit: presuming that these classes inherit from RDF::Vocabulary to manage properties and attributes. |
@gkellogg They don't, but that's good to know about RDF::Vocabulary. |
Some chatter in Hydra, summarized as such: This PR breaks identifiable in the following way - https://github.com/ActiveTriples/ActiveTriples/compare/literal_fix_breaking_spec#diff-2c44efc8662822e940a63660d6b0fcc2R171 |
Reworks the default handling of `Relation` literal values: - Plain `xsd:String` literals are Ruby Strings; - `rdf:langString` literals are returned as `RDF::Literal` objects; - Known datatypes are cast to When setting values from a Relation, always uses the `Literal` value (through `Relation#objects`) to avoid losing data. URIs and blank nods are still cast to their cached `RDFSource` versions. Removes `literal: true` as a relation option. Fixes the bug in #245 causing literal languges to be lost when setting values to an existing `Relation` (including self).
Closed by #246. |
We lose language values when setting using existing values. This affects
#<<
, and#set
calls when aRelation
is the argument.The text was updated successfully, but these errors were encountered: