j4mie / idiorm

A lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5.
http://j4mie.github.com/idiormandparis/
2.01k stars 369 forks source link

Request: Support for MySQL new data format (JSON) #283

Closed rosorrentino closed 8 years ago

rosorrentino commented 8 years ago

MySQL 5.7.8 introduce a new data format The JSON Data Type.

Would be great to see idiorm to support this data format, since it could bring more flexibility and it’s really compatible with the idea behind ORM

Reference: https://dev.mysql.com/doc/refman/5.7/en/json.html

treffynnon commented 8 years ago

Whilst this does sound like a neat idea there is a feature freeze in place so this will not be implemented, sorry. On 1 Dec 2015 01:15, "rosorrentino" notifications@github.com wrote:

MySQL 5.7.8 introduce a new data format The JSON Data Type.

Would be great to see idiorm to support this data format, since it could bring more flexibility and it’s really compatible with the idea behind ORM

— Reply to this email directly or view it on GitHub https://github.com/j4mie/idiorm/issues/283.

Addvilz commented 8 years ago

@treffynnon I don't believe feature freeze should be in effect when considering compatibility with the database engines/driver updates etc. I believe this should fall under the "maintenance" category instead.

treffynnon commented 8 years ago

This is adding functionality not maintaining existing functionality therefore it goes against the feature freeze.

jrborbars commented 8 years ago

It seems WEIRD. Idiorm was a 2 year freeze, and when something changes in the world outside, is simply ignored? This is a way of die a project or something? I used idiorm/paris for a PHP project two years ago and simply love it, but freeze only for freeze, is suicide the entire project. I'm sorry, really sorry for that...

treffynnon commented 8 years ago

Melodrama aside. You've got at least three options here:

  1. Use Idiorm to access the JSON. It's just inserted as text so I don't see a problem there - from the linked manual page:

    INSERT INTO t1 VALUES('{"key1": "value1", "key2": "value2"}');

    Idiorm can do this.

    As for selecting you can use select_expr() or raw queries.

    Unless I am missing something (highly probable) I don't see how Idiorm doesn't already support this.

  2. Fork the library and make it what you want.
  3. Use Eloquent instead - it was designed to look like Idiorm and Paris according to Taylor.
Addvilz commented 8 years ago

Melodrama or not, but it seems quite weird for you to take this position. It's of course your library, and you do not need to explain anything, but even if you can't dedicate time to bring Idiorm "up to speed" (which is entirely understandable, we all have day jobs), someone else might - by submitting a PR. Why would you refuse?

select_expr and raw queries are good and all, but how bad would it be to have a feature for it, I don't know.

Use Eloquent instead - it was designed to look like Idiorm and Paris according to Taylor.

Haha, yes, Laravel is designed to look like a PHP framework as well. According to Taylor.

treffynnon commented 8 years ago

It's not a position - both Idiorm and Paris are feature frozen. That is not changing. As stated there is no work for this ticket - Idiorm already supports this just like it supports COUNT(), etc. There is no special handling required.

If people desperately want to have some kind of feature for this then they're welcome to start their own fork. I will not be merging any such PR into Idiorm or any BC break or feature add PRs for that matter.

So:

jrborbars commented 8 years ago

Like I just said, I'm really sorry for the death of this really amazing project. This project have almost no "idiomatic Java" inside, what that is REALLY GREAT, in case that are no unnecessary complexity added, what that is the weaker side of the other similar projects. I think that, if you cannot find time to maintain a project, maybe you can find a new maintainer. ;-) I will be glad to help you (and others) to maintain this project alive. Since my technical restrictions are large, my willing in maintain this project is greater.

Googling show me that are forks alive:

I didn't see deep inside, but there are some good things to see, I believe.

Best Regards, Jose Ricardo Borba

treffynnon commented 8 years ago

Feature freeze != death. It means maintenance/bugfixes and no new features. Nothing more, nothing less. Frankly, Idiorm has more features in it currently than was ever intended - Idiorm is supposed to be ridiculously simple, 80/20, etc.

Regardless, there is no work in this ticket anyway - it is already supported in the usual Idiorm manner.

If you do not like the feature freeze then you're welcome to create your own fork as long as you adhere to the terms of the very liberal licence. This is how open projects work. If you disagree with Jamie's vision for the project then you're welcome to fork it or write something inspired by it. It does not mean the project is dead or that it is any less valuable or useful - the project just has a defined purpose.