I'm sure it should be possible, but here are two pretty big issues:
- Waaay more work than I want to take care of
- Query layers are a pain, and we both know the current way to set up views is horrible given how plain the text editor is in CreateView()
- Only solves the issue for GDB feature classes*; you couldn't do it in a shapefile, for example. In this case, I'm using a relationship class; frequently it's just using a relate.
- Actually, the Query Layer part is only useful for eGDBs
- fGDBs can take care of Views, at least, but see point #1.
I think for a more permanent dataset, like the one in my example (which does actually live in an eGDB), a view or query layer would probably do the trick the way you outlined it (Will probably give it a shot later today). But the goal is to just have this out of the box.
*Esri I know it's 20 years too late but please give us an easy vocabulary word for feature classes in geodatabases. I like "GDBFC" since it kind of rolls off the tongue and then you and prefix it with what type of GDB it is --> fGDBCFC, eGDBFC, etc. Either way, the lack of a decent vocabulary word is keenly felt; everyone keeps calling all vector data a shapefile (it's not) or a layer (definitely not), or just plain "geodatabase" (ABSOLUTELY NOT) and it makes having a conversation with users really hard because I have to figure out what they actually mean when they say a word.