ruby on rails - Associate Neo4j::ActiveNode models with ActiveRecord models -



ruby on rails - Associate Neo4j::ActiveNode models with ActiveRecord models -

i have application uses neo4j back-end 1 model , postgresql back-end other models. here neo4j model:

class concept include neo4j::activenode property :name def references reference.where(concept_uuid: uuid) end end

and here activerecord model. references table has content_uuid on it:

class reference < activerecord::base def concept concept.where(uuid: concept_uuid).first end end

this works, , can things reference.first.concept , concept.first.references without incident. wish, though, simple instead:

class reference < activerecord::base belongs_to :concepts end class concept < activerecord::base include neo4j::activenode property :name has_many :references end

because i'd things concept.first.references << new_reference out of box. such functionality exist?

i replied on github issue i'll post here in case comes across it!

at moment, we're not planning on building functionality activenode module. see how new module , class created handle sort of thing, we'd need plan out , figure how far go. gem has goal of beingness standalone ogm , since providing activerecord interoperability isn't goal, fear trying tack on behavior aid in pursuit might result in crappy implementations poor back upwards on our end.

you might want check out neoid gem, focus , if/when rebuild finishes, think great job of it.

ruby-on-rails activerecord associations neo4j.rb

Comments

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -