Coder Social home page Coder Social logo

Comments (8)

cedriclombardot avatar cedriclombardot commented on August 16, 2024

I'll try to fix it tonight

Cedric

2011/11/21 Nick <
[email protected]

I have a entity Dealers with two referencing manyToOne:

  • partners
  • city

Dealers.orm.yml:

...\Entity\Dealers:

type: entity
table: dealers
repositoryClass: ...\Entity\DealersRepository
id:
id:
type: bigint
generator:
strategy: IDENTITY
fields:

....

manyToOne:
partner:
targetEntity: ...\Entity\Partners
city:
targetEntity: ...\Entity\Cities

Partners.orm.yml:

 ....
oneToMany:
      dealers:
          targetEntity: ...\Entity\Dealers
          mappedBy: partner
 ....

Cities.orm.yml:

 ....
oneToMany:
      dealers:
          targetEntity: ...\Entity\Dealers
          mappedBy: city
 ....

dealers-generator.yml:

...

generator: admingenerator.generator.doctrine
params:
model: ...\Entity\Dealers
fields:
...
partner:
label: Partner
getter: partner.title
addFormOptions:
property: title
city:
label: City
getter: city.title
addFormOptions:
property: title
builders:
filters:
params:
fields:
display: [ is_published, address, partner, city ]
...

and I decided to add the ability to filter the list of dealers in these
fields.

Without error operates only on filtration by "partners".
When I try to filter by "city" field, getting a few exceptions, the first
of them:

ErrorException: Notice: serialize() [function.serialize]: "id" returned
as member variable from __sleep() but does not exist in
.../vendor/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
line 29

Further more the exception list (28) different classes:

Exception: ClassName:: serialize () must return a string or NULL

Have any ideas how to fix it?


Reply to this email directly or view it on GitHub:
https://github.com/cedriclombardot/AdmingeneratorGeneratorBundle/issues/47

from admingeneratorgeneratorbundle.

cedriclombardot avatar cedriclombardot commented on August 16, 2024

In my Movie demo i try to add a co producer :

<?php

    /**
     * @ORM\ManyToOne(targetEntity="Admingenerator\DemoBundle\Entity\Producer", cascade={"all"}, fetch="EAGER")
     * @ORM\JoinColumn(name="co_producer_id", referencedColumnName="id")
     */
    protected $coproducer;

And in yaml

    coproducer:
      label: Co Producer name
      sort_on: producer.name
      getter: producer.name
      addFormOptions:
        property: name

And when i filter it works fine.

Can you check your deps and try to update thems

And can you send the stack trace

from admingeneratorgeneratorbundle.

suncat2000 avatar suncat2000 commented on August 16, 2024

I updated deps and now get a fatal error (when i filtered):

Fatal error: Maximum function nesting level of '100' reached, aborting! in ~/vendor/symfony/src/Symfony/Component/HttpKernel/Exception/FlattenException.php on line 176

Call Stack

Time Memory Function Location

1 0.0001 334564 {main}( ) ../app_dev.php:0
2 0.0243 3582960 Symfony\Component\HttpKernel\Kernel->handle( ) ../app_dev.php:11
3 0.0480 5840396 Symfony\Bundle\FrameworkBundle\HttpKernel->handle( ) ../bootstrap.php.cache:547
4 0.0480 5841272 Symfony\Component\HttpKernel\HttpKernel->handle( ) ../classes.php:5074
5 1.3405 28487788 Symfony\Component\HttpKernel\HttpKernel->handleException( ) ../classes.php:4109
6 1.3405 28488808 Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher->dispatch( ) ../classes.php:4170
7 1.3405 28490464 Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher->dispatch( ) ../TraceableEventDispatcher.php:65
8 1.3407 28494972 Symfony\Component\EventDispatcher\EventDispatcher->dispatch( ) ../classes.php:5009
9 1.3408 28496120 Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher->doDispatch( ) ../classes.php:3925
10 1.3420 28509488 call_user_func ( ) ../TraceableEventDispatcher.php:112
11 1.3420 28509516 Symfony\Component\HttpKernel\EventListener\ExceptionListener->onKernelException( ) ../TraceableEventDispatcher.php:0
12 1.3427 28569008 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../ExceptionListener.php:66
13 1.3432 28619028 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
14 1.3438 28672328 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
15 1.3443 28725572 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
16 1.3449 28778840 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
17 1.3454 28832100 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
18 1.3460 28885356 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
19 1.3465 28938636 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
20 1.3470 28991904 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
21 1.3476 29045164 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
22 1.3481 29098424 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
23 1.3487 29151684 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
24 1.3492 29205012 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
25 1.3497 29258296 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
26 1.3655 26712540 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
27 1.3660 26765844 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
28 1.3666 26819304 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
29 1.3672 26874956 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
30 1.3677 26930504 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
31 1.3683 26985852 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
32 1.3689 27040324 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
33 1.3694 27094536 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
34 1.3700 27149596 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
35 1.3708 27204316 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
36 1.3718 27258160 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
37 1.3726 27311756 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
38 1.3732 27365996 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
39 1.3737 27420160 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
40 1.3743 27474340 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
41 1.3748 27528436 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
42 1.3754 27582288 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
43 1.3760 27635580 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
44 1.3766 27689060 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
45 1.3772 27742836 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
46 1.3777 27796576 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
47 1.3783 27850356 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
48 1.3788 27904204 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
49 1.3794 27957952 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
50 1.3800 28011360 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
51 1.3806 28064748 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
52 1.3812 28118220 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
53 1.3817 28171776 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
54 1.3823 28225888 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
55 1.3828 28279504 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
56 1.3834 28332856 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
57 1.3840 28386176 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
58 1.3845 28439644 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
59 1.3850 28493056 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
60 1.3856 28546476 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
61 1.3861 28599792 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
62 1.3867 28653116 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
63 1.3872 28706484 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
64 1.3877 28759808 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
65 1.3883 28813104 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
66 1.3889 28866400 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
67 1.3894 28919748 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
68 1.3899 28973040 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
69 1.3905 29026348 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
70 1.3911 29079652 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
71 1.3916 29132972 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
72 1.3921 29186300 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
73 1.3927 29239600 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
74 1.3932 29292892 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
75 1.3937 29346184 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
76 1.3943 29399476 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
77 1.3948 29452768 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
78 1.3954 29506060 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
79 1.3959 29559352 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
80 1.3965 29612648 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
81 1.3970 29665940 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
82 1.3976 29719232 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
83 1.3981 29772524 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
84 1.3987 29825816 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
85 1.3992 29879108 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
86 1.3998 29932400 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
87 1.4003 29985692 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
88 1.4009 30038984 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
89 1.4015 30092276 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
90 1.4020 30145568 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
91 1.4026 30198860 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
92 1.4031 30252152 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
93 1.4037 30305444 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
94 1.4043 30358736 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
95 1.4048 30412028 Symfony\Component\HttpKernel\Exception\FlattenException::create( ) ../FlattenException.php:41
96 1.4049 30414844 Symfony\Component\HttpKernel\Exception\FlattenException->setTrace( ) ../FlattenException.php:38
97 1.4050 30432920 Symfony\Component\HttpKernel\Exception\FlattenException->flattenArgs( ) ../FlattenException.php:167
98 1.4050 30434356 Symfony\Component\HttpKernel\Exception\FlattenException->flattenArgs( ) ../FlattenException.php:182
99 1.4050 30435448 Symfony\Component\HttpKernel\Exception\FlattenException->flattenArgs( ) ../FlattenException.php:182

It seems this is related to the serialization (((

from admingeneratorgeneratorbundle.

cedriclombardot avatar cedriclombardot commented on August 16, 2024

Can you send me by mail a package to reproduce the problem, i can't reproduce on movie in Ipsum > cedric.lombardot<>gmail<> com

from admingeneratorgeneratorbundle.

suncat2000 avatar suncat2000 commented on August 16, 2024

The error occurs if the entity on which the filtering is performed has an additional relation.
My entity Retails has a some relations manyToOne, with entities:

  • Partners (field partners)
  • Cities (field cities)

Entity Partners has no other relation, and entity Cities has relation oneToOne with Geo entity.
If I remove the relation oneToOne from entity Cities, filtering works on the field partners and on the field city.

Maybe this will help to simulate the problem

from admingeneratorgeneratorbundle.

cedriclombardot avatar cedriclombardot commented on August 16, 2024

I've tried to reproduce on the AdmingeneratorDemoBundle of the AdmingeneratorIpsum and i can't reproduce it !! Can you try to make a branch on the admingeneratorIpsum and reproduce it

from admingeneratorgeneratorbundle.

cedriclombardot avatar cedriclombardot commented on August 16, 2024

Your pr solved this point ??

from admingeneratorgeneratorbundle.

suncat2000 avatar suncat2000 commented on August 16, 2024

Yes

from admingeneratorgeneratorbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.