CodeIgniter Forums
DataMapper ORM v2.0 - Input requested - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: DataMapper ORM v2.0 - Input requested (/showthread.php?tid=46485)

Pages: 1 2 3


DataMapper ORM v2.0 - Input requested - El Forum - 11-02-2011

[eluser]WanWizard[/eluser]
I started the development of the next incarnation of DataMapper ORM: version 2.

Most of it will be rewritten, while I try to keep the API unchanged as much as possible. But some things are going to change, will be removed, or will be introduced.

Some of the items already part of the design:
- full support for Core and Reactor 2.0+
- exceptions instead of show_errors()
- support for extending the DataMapper library
- support for model base classes ( a extends b extends c extends DataMapper )
- per model configuration caching and cache expiry
- entirely implemented as a third-party package
- different way of working with extensions
- non-core functionality is now an extension (p.e. validation, transactions)
- extensions are autoload on call
- new relationship type: belongs_to "I have the FK", now has_one/has_many means "You have the FK"
- no more simple relationships, and restructured advanced relationships to make them easier to use
- support for multiple primary keys for a table
- no more fixed 'id' key column
- large reduction of the "Reserved Names" list
- all (public and protected) DataMapper methods and properties for internal use are now prefixed "dm_"

You, who uses DataMapper in you applications, can probably come up with a much longer list of issues, features or improvements.

If so, please let me know, here, or on DataMappers new place on the web: https://github.com/WanWizard/Datamapper2/issues

I love to hear from you.


DataMapper ORM v2.0 - Input requested - El Forum - 01-19-2012

[eluser]Spir[/eluser]
Hi,

There is a small feature that I would love to see in 2.0.

I have two object loaded that have are linked in a n relationship with join fields: Item and Language
But I use my language item in the whole project.
In 1.8.2 if I want to get the join field I have to do it like this :

Code:
$i = new Item();
$i->get_by_id($itemid);

$i->language->include_join_fields()->where('id', $language->id)->get();

I would love to see something like :
Code:
$i->include_join_fields($language);





DataMapper ORM v2.0 - Input requested - El Forum - 01-19-2012

[eluser]WanWizard[/eluser]
I'll put it on the list.


DataMapper ORM v2.0 - Input requested - El Forum - 01-23-2012

[eluser]matrim33[/eluser]
Hi WanWizard,

Thank you very much for taking this project on. DataMapper provides huge value and it looks like you are bringing it to a new next level.

I am fairly new to CI and DataMapper, but I am quickly realizing the value of both.

I have begun developing on your 2.0 develop branch of this project and, so far, my experience has been great, with very few problems. I have done some work implementing the save() and delete() methods and I wondered if my work would be of use to you...

Also, in implementing the save() method, I found that the dm_original object was being updated when any of the dm object properties were updated. For example, when updating the name property of object $o (i.e. $o->name = 'new_name'), both the $o->dm_original and $o->dm_current objects were updated with the new name.

The dm_original object should not be updated until the save() method has been called, correct?

I solved this issue by changing

Code:
$this->dm_original = $this->dm_current = new DataMapper_Datastorage();


to

Code:
$this->dm_original = new DataMapper_Datastorage();
$this->dm_current = new DataMapper_Datastorage();

in the constructor method. (I believe the original code had both $this->dm_original and $this->dm_current pointing to the same object, so I just broke it out to assign dm_original and dm_current to separate objects.)

A long-winded first post, but hopefully it is helpful.

regards,
matt




DataMapper ORM v2.0 - Input requested - El Forum - 01-24-2012

[eluser]WanWizard[/eluser]
Hmmm... Word for the wise:

I would suggest not to use the 2.0 development branch for any project. The reason I stopped committing to it is that I'm busy with a fairly big architectural change.

The current 2.0 code was focused on improving while not breaking the existing API. And that made things even more complex then they already were, and speed wasn't improved either.

I'm planning to start coding again in a few weeks, time and health permitting...


DataMapper ORM v2.0 - Input requested - El Forum - 01-24-2012

[eluser]matrim33[/eluser]
ok, thanks for the heads up Smile


DataMapper ORM v2.0 - Input requested - El Forum - 01-26-2012

[eluser]jordanarseno[/eluser]
Just wanted to chime-in and say thank you to Wan for all he has contributed to the CodeIgniter community.
As others have said.. I too, do not know how I would do my job without it.

It's such a shame that CI is moving in a direction that breaks DM. I guess I'll stick with CI v 2.0.x.
I've subscribed to this thread + the github page... look forward to V2's first official release.

I'd contribute - but like @Dennis Rasmussen - relations do my head in as well!

All the best!


DataMapper ORM v2.0 - Input requested - El Forum - 01-27-2012

[eluser]WanWizard[/eluser]
The current DM is supported on 2.1.0 as well, thanks to the custom bootloader. No reason to stick with 2.0.x.


DataMapper ORM v2.0 - Input requested - El Forum - 01-28-2012

[eluser]InsiteFX[/eluser]
@WanWizard

Any chance of adding code to handle MySQL enum type?

Thanks



DataMapper ORM v2.0 - Input requested - El Forum - 01-28-2012

[eluser]WanWizard[/eluser]
Can you give some examples?