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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 00:11:46
Script start
Timing: Jan 19 2025 00:11:46
Module start 'layout'
Timing: Jan 19 2025 00:11:46
Module start 'content'
Timing: Jan 19 2025 00:11:47
Module end 'content'
Timing: Jan 19 2025 00:11:47
Script end

Main resources:

Total runtime0.9140 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.9219152.6250
Module start 'layout' 0.00580.0030 740.546939.4609
Module start 'content' 0.00880.9037 780.0078553.8125
Module end 'content' 0.91250.0015 1,333.820312.4688
Script end 0.9140  1,346.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3637160.0002
Check MTime0.00130.1442160.0001
Mysql Total
Database connection0.00080.085810.0008
Mysqli_queries0.860594.1411570.0151
Looping result0.00060.0623550.0000
Template Total0.880196.320.4401
Template load0.00220.237720.0011
Template processing0.878096.053020.4390
Template load and register function0.00010.014210.0001
states
state_id_array0.00110.115110.0011
state_identifier_array0.00130.137520.0006
Override
Cache load0.00180.1934210.0001
Sytem overhead
Fetch class attribute can translate value0.00050.058920.0003
Fetch class attribute name0.00090.098950.0002
XML
Image XML parsing0.00220.240520.0011
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00360.3891240.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs