I have a Company entity in Doctrine and Symfony 2. In my Entity I have declared fields such as Name, Street, Zip, City, Country etc... as required using the Doctrine annotations.
Now, in the User Experience I would like people to be able to add a new Company in a quick way.
For example, when adding a project and the user needs to add new Company that's not yet in the database, I'd like for them to enter the Company Name only and automatically create a task in their dashboard, "COMPLETE COMPANY X".
In that way, they can focus on their primary task, which is adding a new project and fill in the required company fields later. But the good thing is that the Company now has an ID and record in the DB and I can use it to link to projects etc...
How would you tackle this problem? In my current setup the required fields are set in the Model and so the database fields are set to NOT NULL.
Should I create a class LightCompany with only required attribute Name and then a class ExtendedCompany which extends LightCompany with all the required fields?
Is there a better way?