Welcome Guest, Not a member yet? Register   Sign In
RapidDataMapper, a new Object-Relational-Mapper
#41

[eluser]Devon Lambert[/eluser]
While working through the Sample application you created m4rw3r I encountered the following error messages:

Code:
A PHP Error was encountered

Severity: Warning

Message: htmlentities() [function.htmlentities]: charset `UTF8' not supported, assuming iso-8859-1

Filename: Plugin/Sluggable.php

Line Number: 188
A PHP Error was encountered

Severity: Warning

Message: html_entity_decode() [function.html-entity-decode]: charset `UTF8' not supported, assuming iso-8859-1

Filename: Plugin/Sluggable.php

Line Number: 190

Any idea why this could be happening? I assume it's not a big deal as the app seems to work as expected otherwise.

Great Addition to CI by the way! :-)
#42

[eluser]m4rw3r[/eluser]
Whoops, for some reason I haven't discovered that UTF8 != UTF-8 on all installations.
I ran that method and it worked fine, now it doesn't.

The fix is to change line 187 of Db/Plugin/Sluggable.php to "$charset = 'UTF-8';" instead of UTF8.
#43

[eluser]Devon Lambert[/eluser]
Cool, I'll make the change.

Do you have plans to compare this to DMZ at all?

I am currently on the hunt for the perfect CI ORM. At first, I landed on Doctrine thanks to Lane4's tuts over at phpandstuff, but with your library I feel like I may have found a much better solution. It seems less heavy and is obviously faster.
#44

[eluser]m4rw3r[/eluser]
I haven't compared it yet, haven't had the time.
Currently some other projects, and school, needs attention.

But I will hopefully get around to do it soon.
#45

[eluser]AnimeCYC[/eluser]
I am having trouble deleting relations, I am using setOnDeleteAction(self::CASCADE) but nothing happens with the related tables; can anyone shed some light on what I am doing wrong?

Code:
Db::delete(Db::find('horse_entry', 1));

Scratch that, just read the docs and it said that it wasn't implemented yet. Anyone have a good way to delete things in a similar manner?
#46

[eluser]m4rw3r[/eluser]
I'm currently implementing the cascade on delete action, so it will hopefully be done soon.
The restrict action is a bit simpler, so it has already been made, you can test it with the latest dev version from github.
#47

[eluser]AnimeCYC[/eluser]
Great news, looking forward to it!
#48

[eluser]m4rw3r[/eluser]
I've finally managed to find time to assemble the ON DELETE RESTRICT and CASCADE actions, they should now work.

I've only made a tiny amount of testing of them, so they are still experimental. But if you would like to try them out, download the latest revision of the source from github.

I will write some functional tests for RDM soon (I have unit tests, currently covering about 44% of the code, but functional tests are also needed).
#49

[eluser]steward[/eluser]
Just wrapping my tiny head around DMZ, Doctrine and RDM now.

If I understand correctly, DMZ will not support "legacy" tables, where the primary key is not called "id" ?

But RDM has a "column alias" which would accomplish this?

At first glance, it seems Doctrine is too heavy, and DMZ too restrictive for my current requirements.

I need to access table created (and still in use) by other apps. I don't get to design the tables, relations or column names.

Would prefer the apparent simplicity of DMZ, but I think this requirement forces me to RDM.

Is that a fair assessment?
#50

[eluser]m4rw3r[/eluser]
I think so, but I'm not completely sure that DMZ doesn't support changing the pk name (although it is limited when it comes to relations, AFAIK).

Anyway, it was a feature I wanted in RDM from the beginning; possibility to change the pk names and also support for multiple pks and fks in relations. The column alias feature is if you want to call a column another name in PHP while retaining the name in the database (eg. login_name in db becomes username in PHP, with only a single configuration change).

I hope it goes well, and if you have any problems or questions about RDM, just ask! Wink

PS. I think I've gotten RDM quite easy to use, but it has a bit steeper learning curve than DMZ as you have to use the Descriptors (if you use the ORM in RDM). If any of you have any suggestions on how to make it easier to use, just tell me Smile




Theme © iAndrew 2016 - Forum software by © MyBB