Comments (3)
This is a limitation of original design (which, at the same time, prevents possible hacks/gotchas where the database has properties with the same name as "sensitive" object methods of Spira objects, e.g. to_s
, new
or the like). I think it should possible to "declare" properties based on the data, instead of using explicit declarations in the Ruby class, but there would be many other implications throughout the gem that we decided to "avoid" for now.
I do not have any objections to your idea, in general, so you're welcome to send us a pull request implementing this "dynamic" declaration of properties.
from spira.
Sorry for the lateness. I don't really need dynamic properties, and think that's more dangerous than it's worth, I just need access to the entire RDF graph for that object - whether I can get to those properties via setters or not. We'll work on a pull request over here.
from spira.
Since Spira is based on RDF.rb, you can always use its lower level API to access stuff directly, e.g. get your object repository (r = my_object.class.repository
), get your object's subject (s = my_object.subject
) and finally, get all triples with that subject using RDF.rb API: ts = r.statements(:subject => s)
(or something among those lines).
from spira.
Related Issues (20)
- Forthcoming RDF.rb 1.1 release and use of git-flow HOT 3
- Incompatibility with rdf > 1.0.7 HOT 4
- example Rails with Spira and allegrograph , any? HOT 1
- help for use Spira in Controller Rails HOT 9
- erro user TYPE , HOT 3
- Error use save method with Blank Nodes. HOT 6
- Spira.repository unavailable in Rails controller HOT 5
- Feature Request: Distinguish between serialized properties and reflections HOT 4
- How to define type later? (on instance level instead of class level) HOT 4
- #== should compare attributes HOT 2
- how to create a blank node without BASE URI, since in theory should not have URI HOT 3
- Spira#count counts subjects - should it count instances? HOT 1
- Use of inefficient splat argument methods in Spira codebase HOT 1
- Spira seems incompatible with activesupport >= 5.2.0 HOT 3
- reset_changes in base.rb throwing NilClass error HOT 6
- #new_record? is wrong if any data already exists
- uninitialized constant RDF::Vocab
- Tests failing due to git refs for gems HOT 1
- link style in docs: github vs yard HOT 2
- Update minimum versions for activemodel/support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spira.