field_attach_form not working as expected
Turns out that the bundle name must be same as entity type.

&lt;?php
...
        'bundles' =&gt; array(
            'fy_teacher' =&gt; array(
                'label' =&gt; t('teacher'),
                'admin' =&gt; array(
                    'path' =&gt; 'admin/structure/teachers',
                    'access arguments' =&gt; array('administer teachers')
                ),
            )
        )
...
?&gt;


For anyone who has this issue,

In your hook_entity_info, under entity keys, simply add the bundle property.
to get the above example to work, simply change the entity keys array to :

&lt;?php
'entity keys' =&gt; array(
            'label' =&gt; 'name',
            'id' =&gt; 'tid',
            'bundle' =&gt; 'property_name' //The name of the property that contains the bundle name for the entity.
        ),
?&gt;


for hook entity info reference, see https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_entity_info/7