Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sonata_type_admin shown as sonata_type_model #2709

Closed
onchainguy-eth opened this issue Feb 4, 2015 · 2 comments
Closed

sonata_type_admin shown as sonata_type_model #2709

onchainguy-eth opened this issue Feb 4, 2015 · 2 comments

Comments

@onchainguy-eth
Copy link

I am trying to embed an entity for inline editing with the field type "sonata_type_admin". The strange thing is that it as shown sonata_type_model so I can only select entities from a list and not edit an entity inline.

Does anyone have a clue how this happens? This is the basic code of my entity, just omitted the irrelevant parts.

/**
 * @ORM\Entity
 */
class Parent
{
    /**
     * @ORM\OneToOne(targetEntity="Child", mappedBy="parent")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="child_id", referencedColumnName="id")
     * })
     */
    private $child;
}

This is the configureFormFields method of my admin class

protected function configureFormFields(FormMapper $formMapper)
{
    $formMapper
        ->add('child', 'sonata_type_admin')
}
@pulzarraider
Copy link
Contributor

@seb0zz do you have the admin service for the child entity? Can you please paste here the service definition of both services and the configureFormFields of the child entity?

@core23
Copy link
Member

core23 commented Feb 12, 2016

If this is an active issue, please reopen @seb0zz

@core23 core23 closed this as completed Feb 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants