|
|
|
|
|
by jrumbut
1239 days ago
|
|
Sure, but people never use those. Also it gets back to the discoverability issue. The ORM documents relationships with the rest of the model code, if you have a poorly named view in a large, complex schema it may be hard to find. You could reinvent the wheel easily. Like everything with SQL, you can solve the problem but sometimes the solution isn't elegant. People want elegance. |
|
- table a joins b yay a view
- table b joins c yay a view
- table c join d yay a view
- table a joins to d. well technically it can, but are you really gonna write all the permutations of views for every possible join?
ORMs encode that nicely so I can easily walk the relationships and get to the query I need.