Forums / Developer / eZPersistentObject and storeobject

eZPersistentObject and storeobject

Author Message

Philippe VINCENT-ROYOL

Tuesday 18 March 2008 9:38:08 am

Hello

I need to transfert a no-ez database to ezpublish database.
I've just a problem.. I have an array of a table named test
I ve create a definition function :

 function definition() {
      return array(
           "fields" => array(
                   "ID_LIEN" => array(
                         "name" => "ID_LIEN",
                          "datatype" => "interger",
                           "default" => 0,
                           "required" => true ),
                    "ID_CATEG" => array(
                           "name" => "ID_CATEG",
                            "datatype" => "integer",
                            "default" => "",
                            "required" => true ),
                     "TITRE" => array(
                             "name" => "TITRE",
                             "datatype" => "string",
                             "default" => "",
                             "required" => true) ),
           "keys" => array( "ID_LIEN" ),
           "increment_key" => "ID_LIEN",
            "class_name" => "test_Liens",
            "name" => "testliens_table"
         );
 }

i ve try to do

 $link = new FHF_Liens($rows);
 $link->store();

but it doesn't appear on back office ..

If someone can help me

Thanks !

Certified Developer (4.1): http://auth.ez.no/certification/verify/272607
Certified Developer (4.4): http://auth.ez.no/certification/verify/377321

G+ : http://plus.tl/dspe
Twitter : http://twitter.com/dspe

André R.

Tuesday 18 March 2008 10:01:32 am

The eZ Publish backoffice (admin) does not automatically recognize alien/custom database tables, whatever you use persistent object or not doesn't change that.

If you want to import content you normally import it into the eZ Publish content ( node -> object -> object version -> object version attributes), but you normally don't do this in php by hand, you use rss import or one of the data import extension here on ez.no.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Philippe VINCENT-ROYOL

Wednesday 19 March 2008 1:17:24 am

okay thanks for your help

Certified Developer (4.1): http://auth.ez.no/certification/verify/272607
Certified Developer (4.4): http://auth.ez.no/certification/verify/377321

G+ : http://plus.tl/dspe
Twitter : http://twitter.com/dspe