Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to export primary keys on data-dump?
    primarykey
    data
    text
    <p>When I export my database with doctrine:data-dump, I encounter 2 problems: * the primary keys are not exported * instead of foreign keys columns correct name, it uses the name of the foreign table.</p> <p>For example, here are my tables:</p> <pre><code># schema.yml Planet: connection: doctrine tableName: planet columns: planet_id: type: integer(4) fixed: false unsigned: false primary: true sequence: planet_planet_id solarsystem_id: type: integer(4) fixed: false unsigned: false notnull: false primary: false # some columns... relations: Solarsystem: local: solarsystem_id foreign: solarsystem_id type: one # other relations... Solarsystem: connection: doctrine tableName: solarsystem columns: solarsystem_id: type: integer(4) fixed: false unsigned: false primary: true sequence: solarsystem_solarsystem_id # other columns... relations: Planet: local: solarsystem_id foreign: solarsystem_id type: many # other relations </code></pre> <p>When I dump, I find things like that in data.yml:</p> <pre><code>Planet_1: Solarsystem: _1 </code></pre> <p>When I data-load that, it doesn't work (Invalid row key specified: (solarsystem) _1, referred to in (planet) Planet_1). I have to fix manually like this:</p> <pre><code>Planet_1: solarsystem_id: 1 planet_id: 1 </code></pre> <p>For the moment, I'm fixing the data.yml manually, but it begins to become a pain with all the records I'm accumulating...</p> <p>Note: I'm using Symfony 1.4, Doctrine, postgreSQL, NetBeans, Windows. Feel free to ask information you would judge useful.</p> <p>Thanks for your help</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload