Skip to content

Commit

Permalink
Merge pull request #24 from bakura10/id
Browse files Browse the repository at this point in the history
Use simple id for entities
  • Loading branch information
DASPRiD committed Aug 3, 2013
2 parents 4895b2f + 86f36ff commit 82f48cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/doctrine/BaconUser.Entity.PasswordResetRequest.dcm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

<entity name="BaconUser\Entity\PasswordResetRequest" table="password_reset_request">
<id name="id" type="integer" column="password_reset_request_id">
<id name="id" type="integer">
<generator strategy="AUTO"/>
</id>

<field name="token" type="string" length="24"/>
<field name="expirationDate" type="datetime" column="expiration_date"/>

<one-to-one field="user" target-entity="BaconUser\Entity\User" fetch="EAGER">
<join-column name="user_id" nullable="false" on-delete="CASCADE"/>
<join-column nullable="false" on-delete="CASCADE"/>
</one-to-one>
</entity>
</doctrine-mapping>
2 changes: 1 addition & 1 deletion config/doctrine/BaconUser.Entity.User.dcm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

<entity name="BaconUser\Entity\User" table="user">
<id name="id" type="integer" column="user_id">
<id name="id" type="integer">
<generator strategy="AUTO"/>
</id>

Expand Down
4 changes: 2 additions & 2 deletions liquibase/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<changeSet id="1" author="dasprid">
<createTable tableName="user">
<column name="user_id" type="int" autoIncrement="true">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="email" type="varchar(255)">
Expand All @@ -26,7 +26,7 @@
</createTable>

<createTable tableName="password_reset_request">
<column name="password_reset_request_id" type="int" autoIncrement="true">
<column name="id" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="user_id" type="int">
Expand Down

0 comments on commit 82f48cf

Please sign in to comment.