by mdasen · 9y ago · 0 comments
Maybe something with two tables: an "authors" table and a "books" table. Then an example of getting authors each struct of which has a `[]Book` of books.
It's composition tool, not a relational one. Sorry.
Isn't the R in ORM for relational?
> Isn't the R in ORM for relational?
I spoke about the nested structs. You can have nested structs for something else than relational mapping.
As I replied to masklinn , I was not sure how to qualify godb, and I admit that ORM is not a perfect qualifier.
No, ORM means Object Relational Mapper. if your ORM doesn't support relations between tables, then it is not a ORM.
Given a relationship between 2 tables, an ORM will at the very least fetch related records when rows from a table are loaded.
> godb does not manage relationships like Active Record or Entity Framework,
Godb is therefore NOT an ORM. The title is misleading. People can't just make up definitions like that. It's either an ORM or it is not.
Godb looks like a simple query builder.