Hi All,
We've a complex and nested Domain Object User
type User struct {
Profile *Profile
// ......
// ......
}
stored in a SQL database as
id, user_name, email, image(Profile), category(Profile)
Using Clean Architecture by having SQL Database behind an interface, how can we best implement querying dynamic set of fields?
1. If we use database column names inside Service layer, it violates Clean Architecture
2. To maintain the integrity of these layers, we might need to use reflection to figure out the column name? or is there any better way to achieve it using code generation?
Regards