The ViewModel object is not what gets stored in a database table, generally. It's the individual items in the ViewModel object that get stored. Each of those items already has an ID.
For example:
public class InvoiceViewModel
{
public Customer Customer { get; set; }
public Address BillingAddress { get; set; }
public Address ShippingAddress { get; set; }
public List<InvoiceLineItem> Items { get; set; }
}
Since there's no single table in the database that corresponds to an InvoiceViewModel, there is no ID for an InvoiceViewModel object.
Of course, you can always use the InvoiceID as the id for this particular ViewModel. InvoiceID is handy, because that's what this object ultimately represents. But I could see having a ViewModel object that doesn't correspond to any particular ID in the database.
The key in understanding MVC lies in the separation of the responsibilities, as MVC is simply SRP applied to UI code. It separates what data has to be displayed, from how to display it, from how to handle screen events. But an important (and often missed) detail of the original definition of MVC is that it was designed for a far more granular level. For instance, you'd have ButtonModel, ButtonView and ButtonController objects, "just" to present a single button on a screen. Missing this detail is what causes so many different opinions on the subject. You can check the Java Swing architecture to see what I mean.
The point of MVC is to allow the code that serves each responsibility to be changed without affecting the code for the others. For instance, you would be able to switch the rendering of (a component on) the screen without having to touch the data representation nor the event-handling logic. So, to a degree, this goes along with what you say here:
From this, I reasoned that given any Model and View, swapping only the controller should not change the data the page initially renders because the controller should change only the behaviour and not the 'content' of the page. I think this aligns with the conceptual visualisation of the controller as a 'station controller' in a rail system, a plan of the rail road as the model and the actual physical manifestation and look/feel of the tracks (in different flavours, say 'Real' or 'Virtual 3D') as the view.
However, in your context, the level of granularity is off; you have a SessionView that seems to be responsible for a whole screen. At this level, the responsibilities get too coupled to fully separate as intended by MVC, thus it may not provide the full benefits.
Your problem is in separating the three UI responsibilities (rendering, the data and the event-handling) for both sessions and processes, a total of six. Because of the level of granularity of the components (whole screen), this becomes impossible, and causes the dissonance you find yourselves into.
You want to separate the rendering and event-handling responsibilities for both Sessions and Processes, but you'd couple their data. Your colleague wants to decouple the data, but couple the event-handling.
So in the end, this is an SRP problem. My way out would be to decrease the level of granularity down to a point where you can clearly separate Sessions from Processes. If you can't do that due to economics, you guys simply have to weight both sides of the trade-off, choose the least worst, and sign it off as technical debt. This is, after all, what design decisions are all about. :)
Best Answer
You have two options:
1) Leave some fields in the model unfilled
2) Create an extra "lite" model for your specific situation
Which one to choose depends on the two things again:
a) How many fields of the "full" model are going to be ignored
b) How often this "lite" model will be instantiated
If there are just a couple or more fields that can be unfilled, it is okay to go with 1).
If b) is just an exceptional individual situation, there is perhaps no point in creating an extra model just for one usage case.
Another approach is to define a "lite" model and inherit the "full" model from it.