Development

#2895 (Referencing tables with double Primary Keys doesnt work in fixtures)

You must first sign up to be able to contribute.

Ticket #2895 (new defect)

Opened 10 months ago

Referencing tables with double Primary Keys doesnt work in fixtures

Reported by: zevero Assigned to: fabien
Priority: major Milestone:
Component: model Version: 1.0.11
Keywords: fixtures doublePK Cc:
Qualification: Unreviewed

Description

Lets have two tables

__doc:
____id:_______{ type: integer, primaryKey: true, required: true, autoIncrement: true }
____version:__{ type: integer, default: 1, primaryKey: true }

__doc_comment:
____doc_id:____{ type: integer, foreignTable: doc, foreignReference: id, primaryKey: true }

in a fixture file it is not possible to Reference to a previous defined Doc156

Doc_Comment:
__Doccomment123:
____doc_id:  Doc156

Whatever I try, the key retrieved for doc_id is alway 1 (throwing an double entry error, when there are two entries)

I tried to include an doc_version: in Table doc_comment, as a foreignKey to the version entry in doc, but this time, the returned key is always 0.