Change typed id in order to support subform select one or new situation

Related discussion: https://groups.google.com/forum/#!topic/hobousers/sY_fyOTCVr8
Merge pull request #37 from Hobo/typed_id_issue

Change typed id in order to support subform select one or new situation