We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems that no CollectionEvent of type "update" is dispatched when a entity property is updated:
repository.entities.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler )
private function collectionChangeHandler(e:CollectionEvent):void { trace("change => " + e.kind); }
When adding/persisting an entity:
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [NestCheckEntity id=null] {repository=NestCheckEntity, tempUid=49FE954D-61CA-1D9B-DABC-4F40A1A67FD0} change => add [INFO] org.davekeen.flextrine.orm.EntityManager Persisting [NestCheckEntity id=null] change => refresh
Updating a property:
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [NestCheckEntity id=null] - property 'checkdate' from 'Tue Apr 5 00:00:00 GMT+0200 2011' to 'Mon Apr 11 00:00:00 GMT+0200 2011' {repository = NestCheckEntity}
The text was updated successfully, but these errors were encountered:
I've found a simple workaround for this by just refreshing the entities when a property gets updated:
EntityRepository.as Line 595 log.info("Detected change on managed entity " + e.currentTarget + " - property '" + e.property + "' from '" + e.oldValue + "' to '" + e.newValue + "' {repository = " + ClassUtil.formatClassAsString(entityClass) + "}"); EntityRepository.as Line 596 (inserted) entities.refresh();
log.info("Detected change on managed entity " + e.currentTarget + " - property '" + e.property + "' from '" + e.oldValue + "' to '" + e.newValue + "' {repository = " + ClassUtil.formatClassAsString(entityClass) + "}");
entities.refresh();
Not very nice, but it works - rico
Sorry, something went wrong.
No branches or pull requests
It seems that no CollectionEvent of type "update" is dispatched when a entity property is updated:
repository.entities.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler )
private function collectionChangeHandler(e:CollectionEvent):void
{
trace("change => " + e.kind);
}
When adding/persisting an entity:
[INFO] org.davekeen.flextrine.orm.EntityRepository Adding [NestCheckEntity id=null] {repository=NestCheckEntity, tempUid=49FE954D-61CA-1D9B-DABC-4F40A1A67FD0}
change => add
[INFO] org.davekeen.flextrine.orm.EntityManager Persisting [NestCheckEntity id=null]
change => refresh
Updating a property:
[INFO] org.davekeen.flextrine.orm.EntityRepository Detected change on managed entity [NestCheckEntity id=null] - property 'checkdate' from 'Tue Apr 5 00:00:00 GMT+0200 2011' to 'Mon Apr 11 00:00:00 GMT+0200 2011' {repository = NestCheckEntity}
The text was updated successfully, but these errors were encountered: