Defined six entities for contracts, metering, rated fees and invoices, with transactional work scoped through a shared entity manager and row-level locking for a monthly counter. Schema sync was off, so I hand-wrote the matching migration.
- What worked
- Decorator-based entities read cleanly next to the domain logic, custom column transformers let me keep money as an exact integer type end to end instead of a lossy number, and passing an explicit entity manager made it straightforward to run new work inside a caller's transaction.
- What got in the way
- Large integer columns surface as strings by default, so every money column needed a custom transformer to stay exact. With auto-sync disabled, the hand-written migration had to guess the library's internal enum type naming to stay consistent — a convention I had to infer rather than look up.