- Model name parsing from OData name.
- Increase version to match ember-flexberry.
- Update changed models in store after batchUpdate.
- Projections parameter for batchUpdate.
- Update model in store after batchUpdate.
- Querying models with
s
at the end.
- Increase version to match ember-flexberry.
- Store
batchSelect
method for loading data with batch.
- Changes from
2.8.0
version. - Set new record id on
preSave
.
SimplePredicate
replace undefined value with null.
- Fix query body in batch update.
- Changes from
2.7.0
version.
- Audit fields creator and editor set.
- Processing errors of batch requests.
- Fix query body in batch update.
- Use
jquery-mockjax
from npm instead of bower.
- Support of
SimplePredicate
andDatePredicate
with two attributes.
- Now during deleting record in offline mode detail records are deleted too.
- Deleted
custom-inflector-rules
. Model names for OData created by addings
.
- Changes from
2.6.1
version.
classify
doesn't work in odata-adapter. Replace with two functionscamelize
andcapitalize
.
- Changes from
2.6.0
version.
- The
ModelWithoutValidation
model without validation. - The
TruePredicate
andFalsePredicate
predicates with implementations for theIndexedDBAdapter
,JsAdapter
, andODataAdapter
adapters.
- Batch details save with unchanged aggregator.
- Resolving Promise on sync up with no jobs.
- Error unloading record with deleted dirty type in batch update.
- Changes from
2.5.0
version.
- The
createExistingRecord
method for theLocalStore
andOnlineStore
classes to create existing records in the storage without query.
- Not loaded
belongsTo
relationships were serialized tonull
when saved. - When processing the response in the
batchUpdate
method of theOData
adapter, models with only thebelongsTo
relationships changed were ignored. - Creating data for syncing in the
Syncer
service when audit is disabled in it.
- Now, when calling the
callFunction
andcallAction
functions from theOData
adapter, the headers from theheaders
property will be added to the request. - When records stored in
IndexedDB
refer to other records that are not inIndexedDB
, when querying those records usingIndexedDBAdapter
, you will see a warning in the console instead of a query error.
- The implementation of the
batchUpdate
method in theOffline
adapter has been removed, and thesave
method is now used instead.
- Implementation of sync up using batch update in
Syncer
service is in progress and not tested properly. You can use it (syncer.syncUp(null, { useBatchUpdate: true })
), but you need to disable audit (auditEnabled
property) and make sure that there is no data to sync created with audit. - See all issues.
- The
fields
parameter with thexhrFields
property for the request in thecallFunction
andcallAction
methods of theOData
adapter is lost.
- The
save
method of theaudit-model
mixin loses arguments when the super method is called. - For models using the
audit-model
mixin, when saved using batch update methods, the audit fields do not fill. - For models using
Offline.ModelMixin
, no change history is generated when saved using batch update methods. - The
OData
adapter:- The
callEmberOdataFunction
method returns a model without relationships, you must specify the projection name to get a model with relationships. - When building query for getting the record in the
batchUpdate
method, the serializer relationships settings were not used. - Building a query with using
IsOfPredicate
when the model name includes a namespace.
- The
- Records deleted using the
batchUpdate
method of theOData
orOffline
adapters remained in the store.
- The
callEmberOdataAction
andcallEmberOdataFunction
methods in theOData
adapter.
- Now, when saving using batch update methods, the
save
method with thesoftSave
option is called for all models.
- Changes from
2.3.0
version.
Adapter.Offline
:- Add
batchUpdate
method for store data in offline database.
- Add
- Building
OData
queries when using quotes (') in theSimplePredicate
andStringPredicate
predicates. - Now the
DS.AdapterError
class is used for errors in thebatchUpdate
method of theOData
adapter.
- Add changes from 2.2.0.
- Add changes from 2.1.0.
- From
Projection.Model
removed the validation mechanism provided by theember-validations
addon.
Adapter.Odata
:- The
batchUpdate
method to send batch update, create or delete models in single transaction, also it's proxy inOffline.Store
,OData.OnlineStore
andOffline.LocalStore
.
- The
offline-globals
:- Add
getOfflineSchema
method for get offline schema.
- Add
Utils
:- Add
isUUID
function in utils for check attribute.
- Add
- Query language:
- Add
stringToPredicate
method for converting strings to predicates.
- Add
- Add copyable mixin for models.
- Fix
batchUpdate
to prevent binded models becoming unavailable after pushPayload(). - Fix
batchUpdate
for models with relationships. - Fix
batchUpdate
when empty array passed. - The
batchUpdate
method in theAdapter.Odata
class built invalid URL to create objects and mutatedheaders
property.
- Add package ember-moment to project.
Utils
:- Add
isOrdered
function inInformation
utils for check ordered attribute.
- Add
Adapter.Odata
- The
callEmberOdataFunction
andcallEmberOdataAction
methods to make OData-function and OData-action calls, returns ember models.
- The
Serializer.Base
:- The
normalize
method for updatetypeClass
in case of polymorphic relationships.
- The
- Query language:
GeometryPredicate
for geometry data types.
Serializer.OData
:- The
normalize
method for updatetypeClass
in case of hasMany polymorphic relationships.
- The
- Query language:
- The
IsOfPredicate
with implementation forOData
. - The
isOf
method inQuery.Builder
for simple usageIsOfPredicate
.
- The
- Loss of
intersectsValue
in theGeographyPredicate
when it insideNotPredicate
.
Projection.OnlineStore
as online store forOffline.Store
.- Implemented
deleteAllRecords
method for online and offline stores ofOffline.Store
.
- Query language:
- Now it's impossible to create
Query.DatePredicate
with invalid date ornull
value.
- Now it's impossible to create
Audit.ModelMixin
:- Fix audit fields saving when
currentUserName
property returns promise.
- Fix audit fields saving when
- Query language:
- The
timeless
mode ofQuery.DatePredicate
forQuery.JsAdapter
. - Building queries for models that have
string
primary key type.
- The
idType
property for defining primary key type on backed, moved fromAdapter.OData
toProjection.Model
.
- Query language:
Timeless
mode forDatePredicate
.
Adapter.Odata
- The
makeRequest
,callAction
andcallFunction
methods to make AJAX-requests, OData-action and OData-function calls correspondingly.
- The
Projection.Model
:- When calling
save
method,model
was always saved offline.
- When calling
Projection.Model
:hasChangedBelongsTo
function to check 'belongsTo' relationship changes.
- Query language:
NotPredicate
fornot
expressions.
Adapter.Odata
- If errors are occured adapter now responses with errors expected in OData JSON Format.
user
service:- Getting of current user name is now able by calling
getCurrentUserName
method fromuser
service.
- Getting of current user name is now able by calling
Projection.Model
:- When calling
validate
method forhasMany
relationships arguments are lost. - When extending
Projection.Model
and using inheritance, the entire hierarchy of models has a sharedprojections
object. Now each child model has its ownprojections
object and copy of parentprojections
object.
- When calling
syncer
service:- Tracking changes for
syncUp
whenbelongsTo
relationships changes.
- Tracking changes for
- Query language:
GeographyPredicate
was fixed.
- Add
GeographyPredicate
for spatial data types. - Add
DatePredicate
for dates. Query.Builder
:- Add
customQueryParams
anddataType
properties.
- Add
Adapter.Odata
:- Add
buildExportExcelURL
function to receive exported excel file URL.
- Add
Utils
:- Add
firstLoadOfflineObjects
function for initial loading and saving objects to IndexedDB.
- Add
- Now if record saving fail, audit record won't be created.
- Replace
Ember.String
functions usage by functions with cyrillic support. Adapter.Odata
:- Improve
buildExportExcelURL
function to receive exported excel file URL. - Now
query
method can return files.
- Improve
Projection.Model
:- Fix
_aggregateHasManyRelationshipValidationErrors
method validation error when deleting new unsaved detail. - Fix
_saveCanonicalBelongsTo
method error whencanonicalBelongsTo
value changed tonull
.
- Fix
Adapter.Offline
:- Fix
syncDownTime
property addition for offline models.
- Fix
syncer
service:- Fix wrong converting of
'true'
strings to boolean value when performing sync up process.
- Fix wrong converting of
Projection.Model
:- Fix
changedHasMany
function: added supporting ofundefined
internal models.
- Fix
syncer
service:- Fix wrong
store
insyncUp
method.
- Fix wrong
Projection.Model
:- Now canonical state of hasMany relationships sets to current state after saving.
Query.IndexedDBAdapter
:- Fix
meta.count
computing.
- Fix
Query.JsAdapter
:- Fixed error when hasMany relationship is undefined in indexed DB.
Query.IndexedDBAdapter
:- Added implementation in-memory joins for offline data instead very slowly relation-by-relation scan and load objects by id.
- Support
count
function of query builder.
Offline.Store
:- Property
offlineModels
for specifying models that should be always loaded from offline store. - Properties
queueSyncDownWorksCount
andcompleteSyncDownWorksCount
for tracking count of objects that should be synced down.
- Property
Adapter.Offline
:- Ability to specify table name for
clear
method. This case can be used for clearing one table. - Logic for saving parent models in offline mode (for create/update/delete operations). Now it is not using transactions (will be added in next versions).
- Ability to specify table name for
Adapter.Odata
:timeout
property.
syncer
service:- Default error handlers. Override
resolveServerError
andresolveNotFoundRecord
methods to add custom logic. - Saving changed relationships for sync up process.
- Ability to specify query object in
syncDown
method in case of syncing down records by model type. - Ability to specify option for unloading records from online store when sync down. It's topical for sync down big data. Please add
{ unloadSyncedRecords: true }
as fourth parameter insyncDown
method calls where needed. syncDownTime
property of model is setting now when performing sync down operation.allowSyncDownRelatedRecordsWithoutProjection
option for offline settings. If true then record will be synced down completely, i.e. including with all related records with arbitrary nesting. Otherwise only requested record will be synced down without related records.
- Default error handlers. Override
Projection.Model
:- Validations for 'hasMany' relationships.
- Model properties:
isSyncingUp
- true if model is syncing up.isCreatedDuringSyncUp
- true if model is created during sync up process.isUpdatedDuringSyncUp
- true if model is updated last time during sync up process.isDestroyedDuringSyncUp
- true if model is destroyed during sync up process.
- Now
dexie
service can work with multiple DBs. - Some parameters checks for
Query.Builder
andUtils.Information
classes.
- Update Dexie to 1.4.2 version.
Offline.Store
:- Now uses static
offlineSchema
. You must defineofflineSchema
property instore
service of your application. Important. This changes are breaking!
- Now uses static
syncer
service:- Changed arguments for
syncUp
method, first parameter now can be and array of jobs for execute, object with options for sync is second parameter now. Important. This changes are breaking! - Disable models unloads after sync down and sync up operations.
- Now we don't replace entire record when sync down. Instead we save only changed properties which are specified in projection for existing records in local store.
- Changed arguments for
Query.IndexedDBAdapter
:- Search by string (e.g. by all fields in lists) is now case insensitive.
Offline.LocalStore
andAdapter.Offline
:- Renamed property
databaseName
todbName
.
- Renamed property
- It is not necessary now to add attribute or relationship to model projection if it is needed for building restriction with query language.
Ember.Logger.xxx
changed toEmber.xxx
calls and throwing errors. So redundant messages will not display in console in production.
- Loading relationships in offline mode moved "under" offline adapter layer, i.e. offline adapter now get "full object" at once with embedded objects for embedded relationships. So now fixed:
Adapter.Offline
apply filters after loading relationships. This allows to filter data by master and detail model's proprties.- There is no relationships that "disappear" unexpectedly after reading data.
- Improved performance for reading data in offline mode.
Adapter.Offline
:- Error at attempt to save existing records into IndexedDB.
- Now it is able to save and read
null
value inboolean
attributes in offline mode. - Not quite adequate implementation of
updateRecord
method. - Closing IndexedDB connection during CRUD operations.
- Errors during parallel requests to IndexedDB (now using queue of requests).
- Errors when making predicates for query object (when passed query to
query
method is notQueryObject
). - Result type for
createRecord
andupdateRecord
methods.
Projection.StoreMixin
:- Wrong projection for reading data used in
findRecord
andfindAll
methods if projection was not specified for query.
- Wrong projection for reading data used in
Query.IndexedDBAdapter
:- IndexedDB not support filter by keys type of
boolean
. - Searching presence of relationships in query with
containsRelationships
method could return wrong results. - Sorting is now applying before skip and top.
- IndexedDB not support filter by keys type of
Query.JsAdapter
:- Search by empty fields.
- Query language:
- Querying records by fields of
date
type. - Filter by boolean value in offline mode, if restriction was passed through complex predicate.
- Querying records by fields of
- Optimizing performance:
- For sync down operation.
- Application loading performance.
- For different operations with data in addon by setting some factories as singletons. It optimizes performance of lookup operation for particular factory because new instance of factory class is not creating.
- CRUD operations in offline adapter.
syncer
service:- Unloading synced records from online store after sync down operation.
- Relationships of model are not reset now when syncing up after changing model in offline mode.
- Validation errors could break syncing up if model was updated in offline mode.
- Wrong store instance was used for loading relationships in offline mode, it causes errors when syncing up.
- Casting for
boolean
type and casting fornull
value of all types while performing sync up. - Saving of wrong relationship type for polymorphic belongsTo relationships in offline audit objects.
- Some internal bugs in
syncDown
method. - Loading only one last relationship when restoring changes for record while performing sync up.
- Considering types of attributes when restoring values while performing sync up, now it makes casting for
date
andnumber
types. reloadLocalRecords
method tried to clear table using model class instead of model name.
Serializer.Offline
:- Now we are setting proper types of polymorphic belongsTo relationships in offline mode.
- Serializing attributes of
boolean
,number
anddecimal
types when saving offline. normalizeArrayResponse
method did not expect that adapter can return response in various format.- Processing of included objects in
normalizeArrayResponse
method.
Projection.Model
:rollbackBelongsTo
method.- Now
changedBelongsTo
is empty after saving created model.
Offline.ModelMixin
:- Audit fields was not filled because
save
method ofOffline.ModelMixin
run beforesave
method ofAudit.ModelMixin
.
- Audit fields was not filled because
Offline.Store
:- Syncing down records with option
syncDownWhenOnlineEnabled
is now using specified projection for online store's method call. useOnlineStore
parameter is not deleting now from query object forquery
andqueryRecord
methods.
- Syncing down records with option
Offline.LocalStore
:- Projection passed in options now processing correctly in
findAll
andfindRecord
methods.
- Projection passed in options now processing correctly in
- Disable offline audit for
i-c-s-soft-s-t-o-r-m-n-e-t-security-agent
model. - Remove validation from audit models.
- Redundant decoration of online serializer.
- Obsolete code in
syncer
service.
- It is not possible for now to specify Dexie upgrage functions when specifying offline schema versions.
Adapter.Offline
:- Using primary key type of string.
- Schema versioning for Dexie.
- Query language support for
offline
adapter. - Dependency on
node-uuid
package. Please update addon usingember install
command or add this dependency topackage.json
manually.
- Model key automatically added for queries without projection (using method
Query.Builder.select
). - Moved base model validation from
ember-flexberry
addon. - Update models for supporting role based security.
- Errors in building queries without projection (using
Query.Builder.select
).
- Dependency on
ember-locaforage-adapter
addon andlocalforage
library. Please remove these dependencies frompackage.json
andbower.json
in your application. Also please delete corresponding folders fromnode_modules
andbower_components
in applicatoin's sources.
- Enum support for OData query language adapter.
guid
transform to support adding constraints on attributes with guid type via query language.- Methods for rollback relationships of model:
changedBelongsTo
- to find outbelongsTo
relationships were changed.rollbackBelongsTo
- to perform rollbackbelongsTo
relationships operation.changedHasMany
- to find outhasMany
relationships were changed.rollbackHasMany
- to perform rollbackhasMany
relationships operation.
- Synchronization of model changes made in offline mode using
syncUp
method (with a server) inSyncer
class. - Models for supporting client side audit.
- Now
syncer
is an ember service.
- Using captions instead keys for enum fields in
syncer
. - Now using
query
method instead ofqueryRecord
inSyncer
because of issue in[email protected]
. - Added missing files to
app/initializers
which are required for offline support.
- Transforms, models, enums and enum initializer from
ember-flexberry
addon. decimal
transform for ability to use '.' and ',' as decimal separator in float numbers. So now it is possible to usedecimal
type for declaring attributes of models.- CRUD operations tests for OData.
- Function
enumCaptions
now returns object without null values. - Offline support:
- It is not necessary now to specify projection when syncing down or reading data from offline storage.
- Using
pathForType
function inODataAdapter
for building URL. - It is possible now to specify
namespace
property inODataAdapter
for building URL.
- As you can see, we started to use integrated tests with OData...
- Method
QueryBuilder.expand
removed.
- Error in building OData query for details.
- Missing classes in
Query
namespace that should be exported. - Error in building OData query for projections.
- Error in building OData query for details.
- Method
store.findRecord
now correctly returns single object. - Using properties for relationships in projections do not cause errors when apply
selectByProjection
method of query language for reading models.
-
Support
polymorphic
options forbelongsTo
relationships. -
Support special 'id' attribute at query language:
new SimplePredicate('manager', 'eq', key) === new SimplePredicate('manager.id', 'eq', key)
-
Classes to support work in offline mode. See
Offline
namespace in api documentation.
- The addon is no longer exports
Projection
namespace with following extra changes:Projection
,Offline
,Adapter
,Serializer
,Query
,Utils
namespaces are exporting now.Projection.Store
mixin renamed toProjection.StoreMixin
.Projection.Adapter
mixin renamed toProjection.AdapterMixin
.- All adapters were included into
Adapter
napespace. - All serializers were included into
Serializer
napespace. - All client query language classes were included into
Query
napespace. Information
class was included intoUtils
napespace. For more information please see api documentation.
- Using
QueryBuilder.byId
method for OData query language adapter.
- Using properties for relationships in projections may cause errors when apply
selectByProjection
method of query language for reading models.
- Predicates for details with any / all functionality.
- Filtering and ordering by master (using primary key) and it's fields.
- Using nested complex predicates for all query language adapters.
- Downgrade version of
broccoli-jscs
to 1.2.2. - Upgrade
ember-cli
to 2.4.3.
- Implementation of abstract query language adapter for IndexedDB.
- Logical operators in OData queries.
- Building OData URL for CRUD operations.
The first release of ember-flexberry-data!
- Implementation of projections - predefined named set of model attributes.
- Implementation of abstract query language and adapters for OData and JSON.
- Implementations of
DS.Store
andDS.Adapter
with support of projections.