Jump to content

Recommended Posts

this works

 


//class PageTable extends Doctrine_Table

$page = $this->createQuery()
	->select('id, body')
	->from('page')
	->where("id = '".$page_id."'")
	->limit(1)
	->fetchArray(array(),  Doctrine::HYDRATE_NONE);

 

this works

 


$page = Doctrine::getTable(self::pageTable)->findOneById( $id ) ;


// NOTE you can perform updates to $page in many ways now none of them work except the below wich requires a validated form

$page->merge($form->getValues());

 

 

this dosent work

 


//class PageTable extends Doctrine_Table

$page = $this->createQuery()
	->update('cms_page_part')
	->set('content_html', 	$page_record['body'])
	->set('content', 		$page_record['body'])
	->where("id = '".$page_id."'")
	->fetchArray(array(),  Doctrine::HYDRATE_NONE);

 

 

basically there is more than one way of doing updates and getting the object, i can get the object but cant do updates in any of the ways described,

 

 

the original developer of the app uses merge but i cant seem to do it with an array it has to be one of his validated arrays that the only object child of docterine object it accepts.

 

why cant i do straight up updates to objects i can retrieve.

 

i know all about the model and how to implement them in docterine

 

 

i can get the opbject inside the controler and perform it there or i can do it inside the table class still updates dont work

 

 

any help otherwise im gona have to do str8 up sql

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.