#112 ✓resolved
Hélio Miranda

Indexed properties problem on extented ruby classes

Reported by Hélio Miranda | March 3rd, 2010 @ 10:25 PM | in 0.4.1

Given the classes:

class Base
  include Neo4j::NodeMixin

  def init_node
    time_now = Time.now

    self[:created] = time_now

  end

  property :created, :type => Time
  index :created
end

class Publication < Base
  property :title, :content
  index :title, :content
end

class Person < Base
  property :name, :uri

  has_n :publications

  index :name
end

When I instantiate a new Person object, ruby throws an error on the indexer layer saying that the title (Publication property) method wasn't found (check out the attached file). I think this is happening because the children indexes are being registered in the ROOT_CLASS (Base). Is there a workaround?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Neo4j.rb is a graph database framework for JRuby.

It provides:

* Mapping of ruby objects to nodes in networks rather than in tables.
* Storage of ruby object to a file system.
* Fast traversal of relationships between nodes in a hugh node space.
* Transaction with rollbacks support.
* Indexing and quering of ruby objects.
* Integration with Rails

People watching this ticket

Attachments

Referenced by

Pages