Class: Synapse::Repository::SimpleRepository

Inherits:
LockingRepository show all
Defined in:
lib/synapse/repository/simple_repository.rb

Overview

Simple repository that works with all sorts of different object mappers, including:

  • ActiveRecord

  • DataMapper

  • Mongoid

  • MongoMapper

The only requirement of the model is that it properly increment the version field upon save

Instance Attribute Summary

Attributes inherited from LockingRepository

#lock_manager

Instance Method Summary collapse

Methods inherited from LockingRepository

#add, #load

Constructor Details

#initialize(lock_manager, aggregate_type) ⇒ undefined

Parameters:



15
16
17
18
# File 'lib/synapse/repository/simple_repository.rb', line 15

def initialize(lock_manager, aggregate_type)
  super lock_manager
  @aggregate_type = aggregate_type
end