Giter Club home page Giter Club logo

Comments (4)

PJKerrigan avatar PJKerrigan commented on May 24, 2024 1

Thanks for the response!

The PHP library I mentioned in my post does allow that. The events inherit from a specific class ShouldBeStored, which has the metadata assigned when they are recorded, before being handed to the aggregate apply method and then projectors and reactors.

I don't mind storing dates and so-on inside the events themselves, it's just quite useful for created_at/updated_at fields on projections.

I'll wait for the rewrite. This seems like a really cool project. 👍

from thalo.

tqwewe avatar tqwewe commented on May 24, 2024

That's a good question I haven't considered before. Currently there's no way to access event metadata in apply. One solution would be to store a timestamp in the event itself.

I'm actually in the process of rewriting thalo entirely, and have been working on it for a few weeks now. I'll try to push what I have soon to a different branch. For this reason though, I have to warn you that using Thalo currently wouldn't provide a lot since its missing a few things. You're better off waiting for me to push the rewrite, or look into another library for the time being. But if you are just playing around then it should be fine.

Does Laravel event sourcing support reading event metadata when applying events to an aggregate?

from thalo.

tqwewe avatar tqwewe commented on May 24, 2024

Hey @PJKerrigan

I've pushed the rewrite under the runtime-rewrite branch!
I'm pretty happy with how things have turned out, though building the examples requires a few steps since wasm components are still very eary stage.

Let me know if you have any questions if you decide to try it out, I'd love to help you with it. Or if you've joined the Discord, feel free to send a message there.

from thalo.

tqwewe avatar tqwewe commented on May 24, 2024

Closing for now as the rewrite allows for this information and has been merged to main

from thalo.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.