Join
himynamej opened this issue · comments
Hi
Can we use join in this struct
? Which struct?
In user and product ,if I wand to join between user and product,where I can write the code
Yea, that is an excellent question. You CAN'T join data across domains inside the Go code. So NO storage package should have a join to a table outside of its domain.
To make the solution you should follow clearer, I made some code changes today. Take a look at the latest code.
- Check out the migration file for a VIEW that JOINS product with some user information.
- Check out the new vproduct domain. There is a new core, storage, and app layer package.
This is how you need to do it. Create a VIEW and build a new domain around that.