Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthormrcyril
     
    Hi

    I am wanting to experiment with a deeper eager fetch of the Object graph for a particular use-case that I have. I have no experience of Rails, but see in the Rails API :

    http://api.rubyonrails.com/classes/ActiveRecord/Associations/ClassMethods.html

    > To include a deep hierarchy of associations, use a hash:
    > for post in Post.find(:all, :include => [ :author, { :comments => { :author => :gravatar } } ])

    Is this implemented in Akelos?

    Can I do something like:

    Post->find('all', array('include' => 'author' , 'comments' => array('include' => 'gravatar')));


    Cyril
    • CommentAuthorKaste
     

    unfortunately not implemented. I really would like to see this.

    • CommentAuthorbjmg
     

    What do you think: Is it hard to implement this? And what is the recommended workaround?

    Thank you!

    • CommentAuthorKaste
     

    What do you think: Is it hard to implement this? yes.

    the refactoring of the current code is the hardest part. I wont do this before we drop php4-support.

    unfortunately the unit tests (for this part of the framework) arent refactored either, so we would have to do this first...

    And what is the recommended workaround?

    lazy-load.