Forums / Discussions / A Quick and Friendly Introduction to eZPersistentObject

Thursday 18 November 2010 9:11:37 am - 8 replies

» Read full tutorial

Introduction

In this tutorial we will learn how to use CRUD features by extending eZPersistentObject class, so it will be possible to Create, Read, Update, and Delete objects in the database in a straightforward way, without writing SQL queries.

 
Author Message

Peter Keung

Thursday 18 November 2010 4:33:28 pm

Great (and friendly) article, Thiago.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Thiago Campos Viana

Thursday 18 November 2010 5:34:40 pm

"

Great (and friendly) article, Thiago.

"

Thanks! It could not be the best tutorial, but I think it has a good title!

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Luca Realdi

Friday 19 November 2010 12:51:16 am

Great tutorial! Thanks!

Richard Bayet

Sunday 21 November 2010 3:09:37 am

Shouldn't the sample code include basic error handling (testing the result of eZPersistentObject::fetchObject against "null" before any further method call), given the intended audience ? ;)

Thiago Campos Viana

Sunday 21 November 2010 11:29:13 am

"

Shouldn't the sample code include basic error handling (testing the result of eZPersistentObject::fetchObject against "null" before any further method call), given the intended audience ? ;)

"

Yeah, we can do a simple:

if($simpleObj!=null){
    ...
}

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Romeo Antony

Monday 22 November 2010 1:47:26 pm

Great work. Thanks for a lot for such a masterpiece.

Jérôme Vieilledent

Thursday 25 November 2010 2:09:32 am

"

Shouldn't the sample code include basic error handling (testing the result of eZPersistentObject::fetchObject against "null" before any further method call), given the intended audience ? ;)

"

Instead of Thiago reply, I'd rather something like :

if( !$obj instanceof TutorialFriendshipObject )
{
    // Handle and log the error
}

Geoff Bentley

Sunday 19 June 2011 3:53:23 am

Great explanation - very thorough references - thanks!!

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