Project

General

Profile

Actions

Feature #4922

closed
KD RS

Dbo: allow foreign keys to be specified as-is

Feature #4922: Dbo: allow foreign keys to be specified as-is

Added by Koen Deforche over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roel Standaert
Target version:
Start date:
05/19/2016
Due date:
% Done:

0%

Estimated time:

Description

Currently, one cannot map just any existing schema to Wt::Dbo because Wt::Dbo enforces how foreign keys are to be named as 'name_pkid' where 'name' is a foreign key name, and 'pkid' is the primary key id(s). This works in general because a key could also be composite.

In some situations you do want to map a simple foreign key literally. We should support this by using a syntax like :

  Wt::Dbo::belongsTo(a, Wt::Dbo::ManyToOne, ">other");

The '>' then indicates that 'other' really is the name of the field that is the foreign key, instead of 'other_id'.

RS Updated by Roel Standaert over 10 years ago Actions #1

  • Status changed from InProgress to Implemented @Emweb

KD Updated by Koen Deforche about 10 years ago Actions #2

  • Status changed from Implemented @Emweb to Resolved

KD Updated by Koen Deforche about 10 years ago Actions #3

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom