Fetching/Storing Aggregates
Fetching and storing Aggregates with repositories in Ecotone PHP
Default flow
Business Repository Interface
interface OrderRepository
{
#[Repository]
public function getOrder(string $orderId): Order;
#[Repository]
public function findOrder(string $orderId): ?Order;
#[Repository]
public function save(Order $order): void;
}Pure Event Sourced Repository
Instant Fetch Aggregate
Allowing non existing Aggregates
Fetching with Closures
Accessing Message Headers
Using External Services
Last updated
Was this helpful?