Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document multiple databases support #937

Open
mostlyobvious opened this issue Dec 30, 2020 · 2 comments
Open

Document multiple databases support #937

mostlyobvious opened this issue Dec 30, 2020 · 2 comments

Comments

@mostlyobvious
Copy link
Member

No description provided.

@mzanini
Copy link

mzanini commented Jun 1, 2023

this.
Was not able to make it work following instructions from this article.
Code:

event_repository = RailsEventStoreActiveRecord::EventRepository.new(
    EventStoreBase, 
    serializer: RubyEventStore::NULL,
  )

Error:
Screenshot 2023-06-01 at 1 58 20 PM

Looks like we now have to pass a model_factory to point to another AR base class?

@mpraglowski
Copy link
Member

Yep, you are right. The behavior described in blog post has changed in commit 8a6e7c3 (and later other changes).

The valid code now is:

  event_repository = RubyEventStore::ActiveRecord::EventRepository.new(
    model_factory: RubyEventStore::ActiveRecord::WithAbstractBaseClass.new(EventStoreBase), 
    serializer: RubyEventStore::NULL,
  )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants