eZ Community » Forums » Developer » EzPersistentObjects: how to join tables
expandshrink

EzPersistentObjects: how to join tables

EzPersistentObjects: how to join tables

Friday 18 May 2012 5:32:58 pm - 2 replies

Hi there,

I'm trying to develop my own module using EzPersistentObjects.

How can I fetch objects joining two tables together. Off course I'm talking about my custom tables, not belonging to the Ez main structure.

 

I hope it's possible!

Thank you

 

[after a while...]

While wating for your hints, I tried to get my result creating a database view and using it to write my object definition.

public static function definition() {
    static $dip = array('fields' => array(......),
'keys' => array('id'),
'increment_key' => 'id',
'class_name' => 'myclass',
'name' => 'myView'); 

}

It does not work! sad.gif Emoticon

Modified on Friday 18 May 2012 6:15:17 pm by Simone Conti

Tuesday 22 May 2012 12:46:08 am

Hi Simone

You could look at the SQL debug output to see what is being fetched from the database.

Also, have you looked at using eZDB instead of eZPersistentObject? It may be a better solution.

Friday 25 May 2012 9:45:42 am

Quote from Mark Blackmore :

Hi Simone

You could look at the SQL debug output to see what is being fetched from the database.

Also, have you looked at using eZDB instead of eZPersistentObject? It may be a better solution.

I never used eZDB class before, but seems a good idea.

Thank you.

 

PS: now everything is working also with sql views.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from