Comments (7)
@sjib to do write concept for this as discussed
from district_heating.
- Add MANDATORY constraint to datamodel @sjib
- Document how this constraint can be turned off if data needs to be imported that has missing Name_Number @sjib
- Implement trigger in forms, that fill in Name_Number = obj_id if no Name_Number is added - see TWW implementation (to do add link @sjib)
- Create sql to fill in obj_id if Name_Number is missing (Update query)
from district_heating.
- Add MANDATORY constraint to datamodel @sjib
I saw that we also do not have MANDATORY constraints in the postgres data model of tww - discuss with Technical group
from district_heating.
- Implement trigger in forms, that fill in Name_Number = obj_id if no Name_Number is added - see TWW implementation (to do add link @sjib)
@urskaufmann How and where did we add this in tww? In the project file or as trigger in the database?
from district_heating.
Name_Nummer (=Identifier) is in tww normally not defined in the project. There must be somewhere a trigger, that sets identifier = obj_id as default value. With one exception: all identifier (reach, channel, reachpoint) in vw_tww_reach do not work like this, there has to be the obj_id defined as default value. The vw_tww_reach is somewhere specially, it's to only view, where the QGIS-standard-"reuse last value" does not work...
from district_heating.
These triggers seem to be created here in tww:
https://github.com/teksi/wastewater/blob/d8a3e3a8f92be62848dfc465c6cba45b824467ca/datamodel/app/view/vw_tww_wastewater_structure.py#L277
In the final database it then looks like this:
NEW.identifier = COALESCE(NEW.identifier, NEW.obj_id);
, CASE WHEN NEW.identifier IS NOT NULL AND NEW.identifier::text <> '' THEN NEW.identifier ELSE COALESCE( NEW.obj_id, tww_sys.generate_oid('tww_od'::text, 'structure_part'::text) ) END
from district_heating.
@urskaufmann In vw_tww_reach there is nothing defined for NEW wwn.identifier - may be that is the reason:
from district_heating.
Related Issues (20)
- Setup.sh - duplicate psql import HOT 2
- QGIS : cannot add pipe_point HOT 1
- value lists pipe_point_normal.kind_missing_translations HOT 1
- Function to Synchronize trench_point.geometry and attribut altitude_channel_bottom HOT 2
- 09_tdh_dictionaries.sql : "tdh_od.plantype" does not exist HOT 1
- Editable views for QGIS pipe_point_normal and pipe_point_feed HOT 4
- trench_line.last_modification missing HOT 1
- structure_line and trench_line missing in the tdh_dictionary HOT 2
- sia405cc_cable - save error HOT 1
- Migration importing data in pipe_point and subclasses HOT 4
- SVG symbol library for District Heating HOT 2
- Pipe_section : attribut name typing mistake : lenght2
- Value list typing mistake : armatures.equipements.tuyeau_metallique (pipe_point_normal_kind) HOT 2
- add DEFERRABLE INITIALLY DEFERRED to all relations HOT 1
- PIPE_POINT_FEED : attributes year_of_* types (dates) HOT 4
- Table to import points from ground survey HOT 1
- Support several geometry types for lines (pipe_section, cables) and for polygons (structure, trench) HOT 2
- Naming convention for foreign keys HOT 4
- pipe_point_normal.kind : translation french to english (vanne or soupape) -> (valve) HOT 6
- Get latest datamodel dump and install tdh data model HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from district_heating.