Yii Framework Forum: Postgresql Hstore Support - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Postgresql Hstore Support Rate Topic: -----

#1 User is offline   de3p 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 19-March 13

Posted 19 March 2013 - 10:34 PM

I looking around for alternative for EAV design and found non sql database and postgresql - hstore to be the good solution.

May i know whether yii activerecord support hstore out the box???
0

#2 User is offline   Nur Rochim 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 04-February 13
  • Location:Indonesia

Posted 20 March 2013 - 09:54 AM

View Postde3p, on 19 March 2013 - 10:34 PM, said:

true, yii have support to make activerecord hstore. I never tried.

0

#3 User is offline   de3p 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 19-March 13

Posted 20 March 2013 - 09:48 PM

Sorry barus sadar kalo postnya di regional Indonesia, padahal mau ngepost di general forumnya.

Iya gak support rasanya, dah coba dikenali sebagai string rasanya harus parse sendiri afterfind sama beforesavenya..

sementara yg tak coba

public function afterFind(){
        eval ('$atributes = array(' . $this->meta_field . ');');
        foreach($atributes as $key=>$val){
            if(isset($this->$key)) 
            $this->$key = $val;
            
        }
    }


meta_field itu tipe hstorenya..
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users