Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Do not extend from ObjectSet #68

Closed
johanjanssens opened this issue Apr 28, 2016 · 0 comments · Fixed by #69
Closed

Do not extend from ObjectSet #68

johanjanssens opened this issue Apr 28, 2016 · 0 comments · Fixed by #69
Labels
Milestone

Comments

@johanjanssens
Copy link
Member

johanjanssens commented Apr 28, 2016

Do not extend ModelEntityComposite and DatabaseRowsetAbstract from ObjectSet, instead compose the objectset as private class property.

Breaking changes:

  • If you are extending from ObjectSet you can no longer access the 'data' property. To migrate your code use the API instead.
  • ModelEntityComposite::toArray() no longer flattens the whole entity collection it only returns a array representation of the current entity. To migrate your code, use iterator_to_array if you want to get a array representation of the all entities in the collection, or traverse through the collection.
  • DatabaseRowsetAbstract::toArray() no longer flattens the whole entity collection it only returns a array representation of the current entity. To migrate your code, use iterator_to_array if you want to get a array representation of the all entities in the collection, or traverse through the collection.
  • Both ModelEntityComposite and DatabaseRowsetAbstract no longer have an top() method. To migrate your code remove the top() method. The composable pattern will ensure that you always get the current entity returned.
@johanjanssens johanjanssens added this to the 3.0.0-beta.2 milestone Apr 28, 2016
johanjanssens added a commit that referenced this issue Apr 28, 2016
- Add clear() method to clear the set
- Use iterator_to_array in the toArray() method
- Add filter() method to handle filtering of the set using a callable
- Make the 'data' property private

BREAKING! If you are extending from ObjectSet you can no longer access the 'data' property. To migrate your code use the API instead.
johanjanssens added a commit that referenced this issue Apr 28, 2016
- Do not extend from ObjectSet, compose it
- Implement missing interface methods
- Refactor implemetation of filter() method
- Change toArray() to return the current entity in the set

BREAKING! ModelEntityComposite::toArray() no longer flattens the whole entity collection it only returns a array representation of the current entity. To migrate your code, use iterator_to_array if you want to get a array representation of the all entities in the collection, or traverse through the collection.
johanjanssens added a commit that referenced this issue Apr 28, 2016
- Do not extend from ObjectSet, compose it
- Implement missing interface methods
- Refactor implemetation of filter() method
- Change toArray() to return the current entity in the set

BREAKING! DatabaseRowsetAbstract::toArray() no longer flattens the whole entity collection it only returns a array representation of the current entity. To migrate your code, use iterator_to_array if you want to get a array representation of the all entities in the collection, or traverse through the collection.
johanjanssens added a commit to timble/kodekit-platform that referenced this issue May 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant