Commit Graph

5 Commits

Author SHA1 Message Date
Tomasz Sowa c89d4f76bc add global Makefile
src/Makefile uses now 'find' for looking for *.cpp files
and we don't need Makefile.o.dep anymore
2022-06-26 06:15:19 +02:00
Tomasz Sowa 89148de66d updated samples
- pikotools is in src subdirectory now
- map_fields() -> fields()
- prepare_table() -> table()
- instead of pt::MainSpaceParser we have pt::MainOptionsParser now
2021-06-24 21:14:29 +02:00
Tomasz Sowa f7490594ad changed the way how the table name is set in a Model - added prepare_table() method
removed from Model:
virtual void table_name(PT::TextStream & stream);

added to Model:
virtual void prepare_table();
virtual void table(const wchar_t * table_name);
virtual void table(const wchar_t * schema_name, const wchar_t * table_name);
2021-03-11 12:22:37 +01:00
Tomasz Sowa 133a45c84b Added flag has_primary_key_set to Model
Now we know whether the primary key is defined or not
and we do not allow to make update/remove if the key is not defined.

And when doing insert/update we can put NULL if child models don't have
the primary key set (fields with has_foreign_key set to true).

Now in after_select() we should also set has_primary_key_set flag
or just call get_last_sequence_for_primary_key instead of get_last_sequence.

fixed: added prefix +00 when serializing PT::Date to PostgreSQL (time zone)
(for a column with a time zone there was a wrong value saved)
2021-03-09 18:10:34 +01:00
Tomasz Sowa 074be938ca added 'samples' directory for samples and tests
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1202 e52654a7-88a9-db11-a3e9-0013d4bc506e
2019-08-21 15:59:03 +00:00