sonata-project/SonataAdminBundle — Issue #569: Admin::getSubject() and sonata_type_collection
Author: halmit
Created: 2012-02-23 15:04:28+00:00
State: open

I have Offer Entity and offerproducts for it as sonata_type_collection (Admin class):

```php
->with('Product Data')
->add(
'offerproducts',
'sonata_type_collection',
array(
'required' => true,
'by_reference' => false
),
array(
'edit' => 'inline',
'inline' => 'table',
'sortable' => 'id'
)
)
```
The problem is that getSubject() give me always a null value in OfferProductsAdmin::configureFormFields(). Is there any tip to get object in that situation?
BTW: When i submit a Offer form - with offerproducts collection - Admin::preUpdate() and Admin::prePersist() is not working for offersproduct Admin...