[Flow] Persist Classes that extends another Class

Johannes johannes at var-dumper.de
Tue Nov 5 14:03:06 CET 2013


Hi,

thank’s a lot! The @ORM\MapedSuperclass did the trick!
By the way, the property from my base class already existed in all tables. But i think this annotation will prevent flow from selecting those properties from the base-class-table.

Thank’s again!

johannes

Am 05.11.2013 um 13:13 schrieb Stephen Bungert <stephenbungert at yahoo.de>:

> Did doctrine update create a table for you base class?
> 
> Then I think it expects a repo too... you can stop the table being created 
> by using the annotation "@ORM\MappedSuperclass" This will then add the base 
> classes properties to your extended classes' tables.
> 
> 
> "Johannes" <mailing at var-dumper.de> schrieb im Newsbeitrag 
> news:mailman.149.1383653020.640.flow at lists.typo3.org...
> HI,
> 
> validation is correct.
> I’m using this command after every modification on models. The Database is 
> also updated (doctrine:update).
> Cache is cleared and everything.
> i’m inserting the data initial with an CommandController. All data is 
> looking good in the database.
> 
> Regards,
> Johannes
> 
> 
> Am 05.11.2013 um 11:03 schrieb Stephen Bungert <stephenbungert at yahoo.de>:
> 
>> Have you run doctrine:validate?
>> 
>> That will check the classes and telly ou if there are any problems with
>> relationships.
>> 
>> 
>> "Johannes" <mailing at var-dumper.de> schrieb im Newsbeitrag
>> news:mailman.102.1383604191.640.flow at lists.typo3.org...
>> Sry, little correction. The Error occurs not on adding but on reading. I 
>> Got
>> some records in the database and the error pops up as soon as i use the
>> model on any fluid template.
>> 
>> Am 04.11.2013 um 23:24 schrieb Johannes <mailing at var-dumper.de>:
>> 
>>> Hey guys,
>>> 
>>> i got an abstract class and two models wich extends that abstract class.
>>> No i want to persist those ($repository->add(model)). But i keep getting
>>> an SQL-Error like this on Query
>>> 
>>> "SELECT t0_.persistence_object_identifier AS
>>> persistence_object_identifier0, t0_.name AS name1, 
>>> t1_.plannedprojecthours
>>> AS plannedprojecthours2, t1_.projectgroup AS projectgroup3 FROM
>>> tisum_project_domain_model_project t1_“
>>> 
>>> " Unknown column 't0_.persistence_object_identifier' in 'field list‘  "
>>> 
>>> As you can see the query isn’t build correctly. There is a mix of t0_ and
>>> t1_.
>>> 
>>> So how can i get this working? Right now i got 2 repositories. One for
>>> each model that extends the abstract class. Do i need an Repository for
>>> the abstract class also?
>>> 
>>> Thank you!
>>> 
>>> Johannes
>>> 
>>> --
>>> Twitter:
>>> @stolle_
>>> 
>>> ---------------------------------------------------------
>>> This E-Mai is signed with OpenPGP
>>> Pub-Key: 31ED1680
>>> 
>>> _______________________________________________
>>> Flow mailing list
>>> Flow at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>> 
>> 
>> _______________________________________________
>> Flow mailing list
>> Flow at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
> 
> 
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow



More information about the Flow mailing list