5 ms·
This is exactly what happens in a typical Elixir project even though Ecto is a query builder and not an ORM. People define their domain entities as database tab
by nesarkvechnep 2mo ago
This is exactly what happens in a typical Elixir project even though Ecto is a query builder and not an ORM. People define their domain entities as database tables. The result is, from my latest project, you have user and organisation memberships which are a list of membership records. This is carried throughout the application while it should be a hash map of organisation IDs and membership data, so you can check if a user is a member of an organisation in constant time. Of course keeping ourselves coupled to the database representation is easier than defining a view, for example, which takes care of presenting the data in a useful form for the application.
- vips7L 2mo agoThat’s a problem with ecto and not ORMs. A good ORM will be able to do that hashmap mapping.
- nesarkvechnep 2mo agoIt’s a problem of philosophy, not tooling.