Commit Graph
24 Commits
Author SHA1 Message Date
Cédric Krier d1bb790cb8 New API to read related fields
issue7888
review58431002
2018-12-21 23:41:56 +01:00
Cédric Krier c7f5c54a83 Remove implicit fields names in ModelStorage.read
It is a bad practice to not explicit the fields to read. So we should not
support it.

issue7830
review54421002
2018-11-28 10:05:01 +01:00
Cédric Krier d2a461390a Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Cédric Krier 57248f9655 Clear cache for all records of ModelSingleton
As write and delete can be called with any ids for records and the super calls
are always on the real record, the cache is only cleared for the real record.
So ModelSingleton must ensure to clear the cache for any record ids.

issue7205
review44731002
2018-03-15 00:23:11 +01:00
Sergi Almacellas Abellana 180d906316 Only return default record if no domain supplied on ModelSingleton search
issue4766
review15401002
2015-06-15 10:19:01 +02:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier e740b5f432 Remove on_change call from default_get
The on_change call doesn't work for xxx2many fields, so it is moved on the
client side where it is properly managed.

issue3923
review6301002
2014-06-08 00:33:31 +02:00
Cédric Krier 2e7c28d348 Add with_on_change switch to default_get
default_get should not call on_change when called in create because it could
modify values set by the caller.

issue3602
review2781002
2014-01-26 21:57:15 +01:00
Cédric Krier f52fe8e45f Use a sequence of records, values in write
issue3499
review1641003
2013-12-19 14:44:01 +01:00
Cédric Krier ce946dcde0 Fix ModelSingleton when reading rec_name via default values
review1114003
2013-10-05 18:04:44 +02:00
Cédric Krier a95ae0dad9 Remove _inherits
review670002
2013-03-20 22:49:16 +01:00
Albert Cervera i Areny 30b1403cdc Use a list of dictionaries in create().
issue2358
review266002
2013-01-06 22:18:13 +01:00
Albert Cervera i Areny ec1761ddca Use None instead of False in ModelSingleton
issue2932
review617002
2012-12-16 23:54:41 +01:00
Cédric Krier 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00
Cédric Krier f9e158b74c Manage _timestamp when reading Singleton that has not yet a record 2011-04-20 14:27:52 +02:00
Cédric Krier 9f3986e7e3 Add values for all fields_names when singleton doesn't exist 2010-12-03 17:23:51 +01:00
Cédric Krier df1fd283ac New transaction management
Remove cursor, user and context from methods and use Transaction instead
2010-08-19 22:01:12 +02:00
Cédric Krier 092196ba4b Fix wrong value passed to super call 2010-07-15 18:58:26 +02:00
Cédric Krier 4513a8f8b9 Documentation refactoring 2010-05-08 14:22:26 +02:00
Cédric Krier 0a9fae483f Return the same id when reading with default_get in Singleton 2010-02-03 15:23:19 +01:00
Cédric Krier 6b0d302a77 Handle count in search of ModelSingleton 2009-10-03 00:24:19 +02:00
Cédric Krier fbde24da78 Fix search on ModelSingleton to always return a list for issue1196 2009-09-30 13:00:11 +02:00
Cédric Krier bf937bcd30 Fix ModelSingleton to return a list if limit is different of 1 and there is no
record.
2009-09-09 23:42:33 +02:00
Cédric Krier 220b6da07f Add ModelSingleton 2009-09-01 14:43:49 +02:00