thankyou! Am Mittwoch, 30. Juli 2014 11:24:19 UTC+2 schrieb Marco Pivetta: > > Hi Janek, > > > On 30 July 2014 08:05, Janek Leibiger <[email protected] <javascript:>> > wrote: > >> I created a DB-Structure for my Project with mySQL Workbench. As you can >> see in the attachment, there is for example a table between "User" and >> "Club" called "club_user". In this table I only have foreign keys and one >> column called "privilege". >> >> When i try to generate the Mapping Data with the doctrine command >> ("orm:convert-mapping ...") it tells me, that doctrine2 does not support >> reverse engeneering from tables that don't have a primary key. >> > > Correct: doctrine2 only understands 2 types of tables: > > - entities > - join tables > > Where join tables are only allowed to have 2 columns that are FKs > referencing other entities. Tables with more columns MUST be entities, as > they carry some more data ( see http://stackoverflow.com/a/15630665/347063 > ). > > > >> How can I manage this issue? Is it possible to create this table with the >> annotation "@jointable" ? And if so, how would the code in my case look >> like? >> > > You can either exclude the table from the import, or you can add a PK to > it (usually, if no duplicates are allowed and there is no PK, then ALL > fields are the PK) and then re-run the import. > > Otherwise, if mapped as a JoinTable, the additional fields will just be > ignored. > > Marco Pivetta > > http://twitter.com/Ocramius > > http://ocramius.github.com/ >
-- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
