Project

General

Profile

Support #3316

Shapefiles: use location_id instead of location - same formalism to be generalized

Added by Philippe May over 7 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Start date:
15/12/2016
Due date:
% Done:

0%

Close

Description

The "location" field in shapefiles (example: raingauge) is a number, reference to a location which has an 'id'. So, the location, as text, is a "join" (in SQL terminology) with the location table.

So, it would make things more clear and easier to maintain the code clear and maintainable, if we use the following formalism everywhere:
the attribute of an object, when that attribute is a "foreign key" (meaning: it's the 'id' field of another table), should be of the form "tablename_id".


Related issues

Related to Gisaf - Feature #3328: Use loc_id for ids of locations Closed 15/12/2016

Associated revisions

Revision c9e45ef9 (diff)
Added by Philippe May over 7 years ago

ORM: use location_id instead of location (Refs #3316)

Revision 5c7f7d17 (diff)
Added by Philippe May over 7 years ago

ORM: add resident model, use proper keys (refs #3316, refs #3307, refs #3308), use proper foreign key names and relations

History

#1 Updated by Philippe May over 7 years ago

QGis limits the length of the field names to 10.

So, OK for loc_id in this example.

#2 Updated by Philippe May over 7 years ago

  • Related to Feature #3328: Use loc_id for ids of locations added

#3 Updated by Philippe May over 7 years ago

  • Status changed from New to Resolved

#4 Updated by Giulio Di Anastasio almost 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF