First of all, did you actually check the docs - it's not complete but there's already documentation for a large chunk of the ORM. Second you get your terminology a bit mixed up: it is and we call the package "ORM", it's an interpretation of the ActiveRecord pattern, DataMapper is a whole other approach to an ORM. We don't call ours ActiveRecord though, just the Fuel ORM. Then to fetching duplicate data, what would be your approach? There's reason why you make the database do the heavy lifting in a request: that's what it's for. Database access is slow, but retrieval on its own is faster. Which is why you care more about fetching the right and complete information. If you know best: feel free to write your own and let's check your system's performance and flexibility against what we have here.Is there any documentation for the Active Records system? Does it support transaction too ? ORM is nice but it gets too many records. One-to-many would get a lot of rows with duplicate data, or is it using another smarter method?
[..]
Thanks for any advice offered, I'm new to the DataMapper system so id appreciate any answers. It would be very useful to my project. DooPHP had a ORM but it does it the long way around so if FuelPHP does the same I will use AR.
Actually, if you prefer this: that's how php.ActiveRecord does it - which I have made available as a package for Fuel.Same case if i wanted 5 blog posts each with 10 tags would it get 50 rows or run the two separate queries 1 to get all blog posts and one to get all tags and then merge them ?
Why don't you, I just going to go out on a limb here, why don't you try if the docs have some info on this?Also just wondering, does the pagination class work like it should? as in in CI it ads offset to the URL rather than page number. Does FuelPHP use page numbers or offsets? (the forum seems to be using offsets)
Fuel offers both input & output cleaning which can be configured in the app/config/config.php file. By default we have no input filter except for the Uri, but we do enable output encoding through the views by default. You can switch this around if you prefer.Are inputs auto cleaned? or do I have to pass it thru the Security class each time? even URI segments?
Jaroslav Petrusevic wrote on Tuesday 5th of April 2011:Hey, if you are curious how the Pagination works, look into this example: https://github.com/abdelm/stationwagon/blob/master/fuel/app/classes/controller/articles.php In general you can download/clone the stationwagon, it has lot's of things to look at, on how the things work etc Good luck
Harro Verton wrote on Wednesday 6th of April 2011:Yes, I've fixed DB profiling in the develop and master branches based on this report, so it will be part of 1.0. For next time, please create a ticket on http://dev.fuelphp.com to make sure the bug is on our to-be-fixed list...
class Model_Music extends Orm\Model { protected static $_table_name = 'mini_lists_music'; protected static $_primary_key = array('list_id'); protected static $_has_one = array( 'lists' => array( 'model_to' => 'Model_Lists', 'key_from' => 'list_id', 'key_to' => 'list_id', ), ); }
Model_Anime::find('all');
It looks like you're new here. If you want to get involved, click one of these buttons!