Discussion about changes in V2 #888
Replies: 1 comment
-
I have also reverted to v1 in my project. I'm massively grateful to rappasoft for creating this package in the first place as v1 has helped my project a great deal. I also understand why developers like re-design/refactor code to make it more maintainable, but I kinda feel like new versions should at least mostly allow user to do what previous versions did. Right now v2 feels like a step backward in the areas you mention (and a few others I've poste on) and the reason we switched back to v1. I appreciate rappasoft is probably really busy, but I'm hoping that maybe he could spare some time to maybe provide a rough roadmap indicating if these features/functionality will be re-included? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @rappasoft, thanks for the amazing package. We use it intensively throughout our project, and it's been very helpful to us.
Some time ago we made the decision to migrate to V2, and going through this process we noticed some changes/decisions that we don't fully understand and made us decide to stay at V1 for now. This is also the reason we thought it would be nice to open a healthy discussion about these said changes, to understand them better and perhaps improve the package in general.
WithCount()
In V1, you could make use of the ->withCount() functionality, as demonstrated below.
In V2
Trying to make use of this functionality will result in the following error.
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'posts.comments_count' in 'field list'
Possible solution
Adding an option to disable automatically adding the second param to the query can be a possible solution. Something like
Which will set the needed property on the column, which can then be used in
WithData;120
to skip adding the column to the query. IrowView() does not exist anymore
We use rowView extensively throughout our project, we like this because we have a lot of blade in these files. In v2, this functionality is removed. It looks like other people using this package are missing this functionality too. #884
We we wonder why this decision has been made to remove this functionality.
Missing support for relationships different than HasOne or BelongsTo
In V1, more relationship types were supported, such as MorphOne and HasMany.
In V2, to add a column for these relationships won't work anymore and will throw an error.
These relationship types should be supported, see:
I opened a PR for MorphOne support here: #844
Issue stating HasMany problem: #874
Beta Was this translation helpful? Give feedback.
All reactions