Sha256: 394078128d42d058410e92db32028b0d070d3131f4bb8f26010674e105ef763c

Contents?: true

Size: 668 Bytes

Versions: 124

Compression:

Stored size: 668 Bytes

Contents

module Neo4j::ActiveNode::Initialize
  extend ActiveSupport::Concern
  include Neo4j::Shared::Initialize

  attr_reader :called_by

  # called when loading the node from the database
  # @param [Neo4j::Node] persisted_node the node this class wraps
  # @param [Hash] properties of the persisted node.
  def init_on_load(persisted_node, properties)
    self.class.extract_association_attributes!(properties)
    @_persisted_obj = persisted_node
    changed_attributes && changed_attributes.clear
    @attributes = convert_and_assign_attributes(properties)
  end

  def init_on_reload(reloaded)
    @attributes = nil
    init_on_load(reloaded, reloaded.props)
  end
end

Version data entries

124 entries across 124 versions & 2 rubygems

Version Path
neo4j-7.0.0 lib/neo4j/active_node/initialize.rb
neo4j-7.0.0.rc.7 lib/neo4j/active_node/initialize.rb
neo4j-7.0.0.rc.6 lib/neo4j/active_node/initialize.rb
neo4j-7.0.0.rc.5 lib/neo4j/active_node/initialize.rb
neo4j-6.1.10 lib/neo4j/active_node/initialize.rb
neo4j-6.0.8 lib/neo4j/active_node/initialize.rb
neo4j-7.0.0.rc.4 lib/neo4j/active_node/initialize.rb
neo4j-7.0.0.rc.3 lib/neo4j/active_node/initialize.rb
neo4j-7.0.0.rc.2 lib/neo4j/active_node/initialize.rb
neo4j-6.1.9 lib/neo4j/active_node/initialize.rb
neo4j-6.0.7 lib/neo4j/active_node/initialize.rb
neo4j-7.0.0.rc.1 lib/neo4j/active_node/initialize.rb
neo4j-6.1.8 lib/neo4j/active_node/initialize.rb
neo4j-6.1.7 lib/neo4j/active_node/initialize.rb
neo4j-6.1.6 lib/neo4j/active_node/initialize.rb
neo4j-6.1.5 lib/neo4j/active_node/initialize.rb
neo4j-6.1.4 lib/neo4j/active_node/initialize.rb
neo4j-6.1.3 lib/neo4j/active_node/initialize.rb
neo4j-6.1.2 lib/neo4j/active_node/initialize.rb
neo4j-6.0.6 lib/neo4j/active_node/initialize.rb