I'm having a very weird problem with flextrine when flushing or adding specific entities the second time - sounds strange I know.
The workflow as a screencast:
http://dl.dropbox.com/u/38483/flextrine_namespace_issue_workflow.swf
This is the console log of the workflow that produces the error:
NestCheckEntity
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [NestCheckEntity id=null] {repository=NestCheckEntity, tempUid=881A918E-97FB-886A-20AA-539835BF5B12}
[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [NestCheckEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [NestCheckEntity id=null] - property 'checkdate' from 'null' to 'Sun Apr 3 00:00:00 GMT+0200 2011' {repository = NestCheckEntity}
BoxCheckEntity
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [BoxCheckEntity id=null] {repository=BoxCheckEntity, tempUid=2D8B2489-5B29-B931-4EDC-539889BE46E7}
[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [BoxCheckEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [BoxCheckEntity id=null] - property 'box' from 'null' to '[BoxEntity id=12]' {repository = BoxCheckEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [BoxCheckEntity id=null] - property 'nestcheck' from 'null' to '[NestCheckEntity id=null]' {repository = BoxCheckEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [BoxCheckEntity id=null] - property 'rank' from '0' to '1' {repository = BoxCheckEntity}
LitterEntity
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [LitterEntity id=null] {repository=LitterEntity, tempUid=A827DD74-0E8B-9191-EE6B-53990A841CED}
[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [LitterEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'identifier' from 'null' to '2011041412' {repository = LitterEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'first_found_age' from '0' to '12' {repository = LitterEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'first_found_date' from 'null' to 'Thu Apr 14 12:40:29 GMT+0200 2011' {repository = LitterEntity}
LitterCheckEntity
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [LitterCheckEntity id=null] {repository=LitterCheckEntity, tempUid=926A4AE4-8B9E-DB29-100D-53990A8877DA}
[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [LitterCheckEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterCheckEntity id=null] - property 'locationCheck' from 'null' to '[BoxCheckEntity id=null]' {repository = LitterCheckEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterCheckEntity id=null] - property 'litter' from 'null' to '[LitterEntity id=null]' {repository = LitterCheckEntity}
Flushing
[INFO] org.davekeen.flextrine.orm.EntityManager Flushing
[INFO] org.davekeen.flextrine.orm.EntityManager Updating persisted entity [LitterCheckEntity id=null] with uid 926A4AE4-8B9E-DB29-100D-53990A8877DA
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterCheckEntity id=1] to [LitterCheckEntity id=1] {repository=LitterCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxCheckEntity id=null] to [BoxCheckEntity id=null] {repository=BoxCheckEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [NestCheckEntity id=null] to [NestCheckEntity id=null] {repository=NestCheckEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxEntity id=12] to [BoxEntity id=12] {repository=BoxEntity, idHash=12}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterEntity id=null] to [LitterEntity id=null] {repository=LitterEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityManager Updating persisted entity [LitterEntity id=null] with uid A827DD74-0E8B-9191-EE6B-53990A841CED
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterEntity id=1] to [LitterEntity id=1] {repository=LitterEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterCheckEntity id=1] to [LitterCheckEntity id=1] {repository=LitterCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxCheckEntity id=null] to [BoxCheckEntity id=null] {repository=BoxCheckEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [NestCheckEntity id=null] to [NestCheckEntity id=null] {repository=NestCheckEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxEntity id=12] to [BoxEntity id=12] {repository=BoxEntity, idHash=12}
[INFO] org.davekeen.flextrine.orm.EntityManager Updating persisted entity [BoxCheckEntity id=null] with uid 2D8B2489-5B29-B931-4EDC-539889BE46E7
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxCheckEntity id=1] to [BoxCheckEntity id=1] {repository=BoxCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterCheckEntity id=1] to [LitterCheckEntity id=1] {repository=LitterCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterEntity id=1] to [LitterEntity id=1] {repository=LitterEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [NestCheckEntity id=null] to [NestCheckEntity id=null] {repository=NestCheckEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxEntity id=12] to [BoxEntity id=12] {repository=BoxEntity, idHash=12}
[INFO] org.davekeen.flextrine.orm.EntityManager Updating persisted entity [NestCheckEntity id=null] with uid 881A918E-97FB-886A-20AA-539835BF5B12
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [NestCheckEntity id=1] to [NestCheckEntity id=1] {repository=NestCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxCheckEntity id=1] to [BoxCheckEntity id=1] {repository=BoxCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterCheckEntity id=1] to [LitterCheckEntity id=1] {repository=LitterCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterEntity id=1] to [LitterEntity id=1] {repository=LitterEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxEntity id=12] to [BoxEntity id=12] {repository=BoxEntity, idHash=12}
==> Everything is saved to the database
Editing BoxCheckEntity -> adding Litter and LitterCheckEntity
INFO] org.davekeen.flextrine.orm.EntityRepository Adding [LitterEntity id=null] {repository=LitterEntity, tempUid=DA0C042C-BBF7-2569-1990-539D2A4786C8}
[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [LitterEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'identifier' from 'null' to '2011041412_1' {repository = LitterEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'first_found_age' from '0' to '12' {repository = LitterEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'first_found_date' from 'null' to 'Thu Apr 14 12:44:59 GMT+0200 2011' {repository = LitterEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [LitterCheckEntity id=null] {repository=LitterCheckEntity, tempUid=2550C0E4-5375-F58A-99FA-539D2A4D006E}
[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [LitterCheckEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterCheckEntity id=null] - property 'locationCheck' from 'null' to '[BoxCheckEntity id=1]' {repository = LitterCheckEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterCheckEntity id=null] - property 'litter' from 'null' to '[LitterEntity id=null]' {repository = LitterCheckEntity}
Flushing
[INFO] org.davekeen.flextrine.orm.EntityManager Flushing
PHP error ==> PHP Fatal error: require() [function.require]: Failed opening required '/Library/WebServer/micemeta/flextrine/php/app/micemeta/entities/ch_tofuse_micemeta_entities::LitterEntity.php' (include_path='.:/usr/local/php5/lib/php:/Library/WebServer/micemeta/flextrine/php/lib') in /Library/WebServer/micemeta/flextrine/php/lib/Doctrine/Common/ClassLoader.php on line 148
The saved Charles session: http://dl.dropbox.com/u/38483/php_namespace_issue_charles_session.chls
The php stack trace: http://dl.dropbox.com/u/38483/php_namespace_issue_stack_trace
In the Charles session, I noticed that the "Object Reference" of the new LitterEntity sent to the server during the second flush is already wrong (ch.tofuse.micemeta.entities::LitterEntity).
I put all my code on github. The flex application https://github.com/rico/micemeta-flex , the flextrine part https://github.com/rico/micemeta-flextrine .
The magic happens here https://github.com/rico/micemeta-flex/blob/master/src/ch/tofuse/micemeta/views/components/nestcheck/NestcheckOverview.mxml , where the BoxCheck entities , and here https://github.com/rico/micemeta-flex/blob/master/src/ch/tofuse/micemeta/views/components/nestcheck/NestcheckLitterView.mxml , where Litter entities and LitterCheck entities are handled.
OS: OS X 10.6.7
PHP: 5.3.4
Webserver: Apache/2.2.17 (Unix)
Tested with the latest checkout from 12.April.
I'm really sorry if this is just a simple coding error from my side, but I can't see how my code can influence the namespace - or whatever - of an entity class between two flushes.
Thank you for looking into it - rico
I'm having a very weird problem with flextrine when flushing or adding specific entities the second time - sounds strange I know.
The workflow as a screencast:
http://dl.dropbox.com/u/38483/flextrine_namespace_issue_workflow.swf
This is the console log of the workflow that produces the error:
NestCheckEntity
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [NestCheckEntity id=null] {repository=NestCheckEntity, tempUid=881A918E-97FB-886A-20AA-539835BF5B12}[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [NestCheckEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [NestCheckEntity id=null] - property 'checkdate' from 'null' to 'Sun Apr 3 00:00:00 GMT+0200 2011' {repository = NestCheckEntity}
BoxCheckEntity
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [BoxCheckEntity id=null] {repository=BoxCheckEntity, tempUid=2D8B2489-5B29-B931-4EDC-539889BE46E7}[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [BoxCheckEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [BoxCheckEntity id=null] - property 'box' from 'null' to '[BoxEntity id=12]' {repository = BoxCheckEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [BoxCheckEntity id=null] - property 'nestcheck' from 'null' to '[NestCheckEntity id=null]' {repository = BoxCheckEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [BoxCheckEntity id=null] - property 'rank' from '0' to '1' {repository = BoxCheckEntity}
LitterEntity
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [LitterEntity id=null] {repository=LitterEntity, tempUid=A827DD74-0E8B-9191-EE6B-53990A841CED}[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [LitterEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'identifier' from 'null' to '2011041412' {repository = LitterEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'first_found_age' from '0' to '12' {repository = LitterEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'first_found_date' from 'null' to 'Thu Apr 14 12:40:29 GMT+0200 2011' {repository = LitterEntity}
LitterCheckEntity
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [LitterCheckEntity id=null] {repository=LitterCheckEntity, tempUid=926A4AE4-8B9E-DB29-100D-53990A8877DA}[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [LitterCheckEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterCheckEntity id=null] - property 'locationCheck' from 'null' to '[BoxCheckEntity id=null]' {repository = LitterCheckEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterCheckEntity id=null] - property 'litter' from 'null' to '[LitterEntity id=null]' {repository = LitterCheckEntity}
Flushing
[INFO] org.davekeen.flextrine.orm.EntityManager Flushing[INFO] org.davekeen.flextrine.orm.EntityManager Updating persisted entity [LitterCheckEntity id=null] with uid 926A4AE4-8B9E-DB29-100D-53990A8877DA
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterCheckEntity id=1] to [LitterCheckEntity id=1] {repository=LitterCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxCheckEntity id=null] to [BoxCheckEntity id=null] {repository=BoxCheckEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [NestCheckEntity id=null] to [NestCheckEntity id=null] {repository=NestCheckEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxEntity id=12] to [BoxEntity id=12] {repository=BoxEntity, idHash=12}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterEntity id=null] to [LitterEntity id=null] {repository=LitterEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityManager Updating persisted entity [LitterEntity id=null] with uid A827DD74-0E8B-9191-EE6B-53990A841CED
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterEntity id=1] to [LitterEntity id=1] {repository=LitterEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterCheckEntity id=1] to [LitterCheckEntity id=1] {repository=LitterCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxCheckEntity id=null] to [BoxCheckEntity id=null] {repository=BoxCheckEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [NestCheckEntity id=null] to [NestCheckEntity id=null] {repository=NestCheckEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxEntity id=12] to [BoxEntity id=12] {repository=BoxEntity, idHash=12}
[INFO] org.davekeen.flextrine.orm.EntityManager Updating persisted entity [BoxCheckEntity id=null] with uid 2D8B2489-5B29-B931-4EDC-539889BE46E7
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxCheckEntity id=1] to [BoxCheckEntity id=1] {repository=BoxCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterCheckEntity id=1] to [LitterCheckEntity id=1] {repository=LitterCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterEntity id=1] to [LitterEntity id=1] {repository=LitterEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [NestCheckEntity id=null] to [NestCheckEntity id=null] {repository=NestCheckEntity, idHash=}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxEntity id=12] to [BoxEntity id=12] {repository=BoxEntity, idHash=12}
[INFO] org.davekeen.flextrine.orm.EntityManager Updating persisted entity [NestCheckEntity id=null] with uid 881A918E-97FB-886A-20AA-539835BF5B12
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [NestCheckEntity id=1] to [NestCheckEntity id=1] {repository=NestCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxCheckEntity id=1] to [BoxCheckEntity id=1] {repository=BoxCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterCheckEntity id=1] to [LitterCheckEntity id=1] {repository=LitterCheckEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [LitterEntity id=1] to [LitterEntity id=1] {repository=LitterEntity, idHash=1}
[INFO] org.davekeen.flextrine.orm.EntityRepository Updating [BoxEntity id=12] to [BoxEntity id=12] {repository=BoxEntity, idHash=12}
==> Everything is saved to the database
Editing BoxCheckEntity -> adding Litter and LitterCheckEntity
INFO] org.davekeen.flextrine.orm.EntityRepository Adding [LitterEntity id=null] {repository=LitterEntity, tempUid=DA0C042C-BBF7-2569-1990-539D2A4786C8}[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [LitterEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'identifier' from 'null' to '2011041412_1' {repository = LitterEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'first_found_age' from '0' to '12' {repository = LitterEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterEntity id=null] - property 'first_found_date' from 'null' to 'Thu Apr 14 12:44:59 GMT+0200 2011' {repository = LitterEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [LitterCheckEntity id=null] {repository=LitterCheckEntity, tempUid=2550C0E4-5375-F58A-99FA-539D2A4D006E}[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [LitterCheckEntity id=null]
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterCheckEntity id=null] - property 'locationCheck' from 'null' to '[BoxCheckEntity id=1]' {repository = LitterCheckEntity}
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [LitterCheckEntity id=null] - property 'litter' from 'null' to '[LitterEntity id=null]' {repository = LitterCheckEntity}
Flushing
[INFO] org.davekeen.flextrine.orm.EntityManager Flushing
PHP error ==> PHP Fatal error: require() [function.require]: Failed opening required '/Library/WebServer/micemeta/flextrine/php/app/micemeta/entities/ch_tofuse_micemeta_entities::LitterEntity.php' (include_path='.:/usr/local/php5/lib/php:/Library/WebServer/micemeta/flextrine/php/lib') in /Library/WebServer/micemeta/flextrine/php/lib/Doctrine/Common/ClassLoader.php on line 148
The saved Charles session: http://dl.dropbox.com/u/38483/php_namespace_issue_charles_session.chls
The php stack trace: http://dl.dropbox.com/u/38483/php_namespace_issue_stack_trace
In the Charles session, I noticed that the "Object Reference" of the new LitterEntity sent to the server during the second flush is already wrong (ch.tofuse.micemeta.entities::LitterEntity).
I put all my code on github. The flex application https://github.com/rico/micemeta-flex , the flextrine part https://github.com/rico/micemeta-flextrine .
The magic happens here https://github.com/rico/micemeta-flex/blob/master/src/ch/tofuse/micemeta/views/components/nestcheck/NestcheckOverview.mxml , where the BoxCheck entities , and here https://github.com/rico/micemeta-flex/blob/master/src/ch/tofuse/micemeta/views/components/nestcheck/NestcheckLitterView.mxml , where Litter entities and LitterCheck entities are handled.
OS: OS X 10.6.7
PHP: 5.3.4
Webserver: Apache/2.2.17 (Unix)
Tested with the latest checkout from 12.April.
I'm really sorry if this is just a simple coding error from my side, but I can't see how my code can influence the namespace - or whatever - of an entity class between two flushes.
Thank you for looking into it - rico