automatic link child class (has_one parent) in addNewForm

this HACK is a great improvement to the CMS. That is, it needs to be improved in terms of code BUT it adds an important feature.

Imagine you have a DataObject Country with a linked DataObject cities (one country has_many cities - a city has_one country).  Then, using default form field scaffolding in the CMS, if you edit a country and click on the "Add City" button (at the top of the gridfield); the presented "create new city" form does NOT link back to the Country by default (i.e. there is a country dropdown for you to select the right country, but it does NOT - by default - select the country you "came from".  In my opinion this is annoying for the user ... It should select the parent country in the country dropdown field.  The hack here fixes this.  I am sure there is a better way to do this, but I am not sure how..... PLEASE HELP!

Alternative ways to do this may include:

* add parameters in "add new ... " button 
* add parent + child references in controlling classes (e.g. modeladmin / gridfield classes).

What I really need to find out is where and how this relationship of the parent and child (as expressed in the URL) comes from so that rather than dissecting the URL and hacking it, we can automatically set the link to the parent right at the source. 

The URL is generally formed like this (each line being one segment):

admin/
[url for modeladmin]/
[parentclass]/
EditForm/
field/
[parentclass]/
item/
[parent record ID]/
ItemEditForm/
field/
[child class name]/
item/
new