Re: EAV (Entity-Attribute-Value) Data Model with CakePHP

2009-06-17 Thread Maine

byqsri, yes, it really seems like we're still awaiting for the
documentation: http://waww.com.au/projects/cakephp-eav

I don't have a working setup using EAV plugin, but by reading through
the source code I got some sort of a picture of the gadget. Take a
look at the EavBehaviour [1]: On the line 4 you have $typeModels that
(like normal models) correspond to tables, whose structure (can be
seen around line 206 in afterSave function) should be: id,
attribute_id, model, foreign_key, value. The datatype of value column
depends on the model. You also need a table for EavAttributes, whose
structure is something along the lines of (see admin_add view [2]):
id, name, model, type, options. Then you can also see the available
admin functions for defining the EAV schema in the controller [3].

Hope this helps!

[1] 
http://github.com/morrislaptop/cakephp-eav/blob/1993735857f4c9339578fd8e481ce85fa0193385/models/behaviors/eav.php
[2] 
http://github.com/morrislaptop/cakephp-eav/blob/1993735857f4c9339578fd8e481ce85fa0193385/views/eav_attributes/admin_add.ctp
[3] 
http://github.com/morrislaptop/cakephp-eav/blob/1993735857f4c9339578fd8e481ce85fa0193385/controllers/eav_attributes_controller.php

On Jun 17, 9:14 am, byqsri marco.rizze...@gmail.com wrote:
 @Maine:
 I 'm very interested to understand the EAV plugin but there isn't
 documentation.
 Do you have try it?Can you give me an example?
 Many Thanks

 On 16 Giu, 12:04, Maine maine3...@gmail.com wrote:

  Just did this recently. I found the following resources valuable:
  - Expandable 
  Behavior:http://debuggable.com/posts/unlimited-model-fields-expandable-behavio...
  - EAV Plugin:http://github.com/morrislaptop/cakephp-eav/tree/master
  - Dynamic Data Fields: Practical CakePHP 
  Projects:http://www.amazon.com/Practical-CakePHP-Projects/dp/143021578X

  Ended up using Expandable Behavior as the simplest solution. The other
  options would help storing the data using proper datatypes and
  administering EAV schema. But in my case the amount of data or query
  volume didn't really require these.

  On Jun 15, 11:39 pm, marco.rizze...@gmail.com

  marco.rizze...@gmail.com wrote:
   Hi
   I must use a EAV schema for my web app but I have no idea about how
   realizate this in cake?
   I have a table with entities , a table with atrributes and many table
   with value (one for datetime value,one for varchar value ,one for text
   value  etc. ).
   Can someone give me some suggestion about this?
   Many Thanks
   Marco


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: EAV (Entity-Attribute-Value) Data Model with CakePHP

2009-06-16 Thread Maine

Just did this recently. I found the following resources valuable:
- Expandable Behavior:
http://debuggable.com/posts/unlimited-model-fields-expandable-behavior:48428c2e-9a88-47ec-ae8e-77a64834cda3
- EAV Plugin: http://github.com/morrislaptop/cakephp-eav/tree/master
- Dynamic Data Fields: Practical CakePHP Projects:
http://www.amazon.com/Practical-CakePHP-Projects/dp/143021578X

Ended up using Expandable Behavior as the simplest solution. The other
options would help storing the data using proper datatypes and
administering EAV schema. But in my case the amount of data or query
volume didn't really require these.

On Jun 15, 11:39 pm, marco.rizze...@gmail.com
marco.rizze...@gmail.com wrote:
 Hi
 I must use a EAV schema for my web app but I have no idea about how
 realizate this in cake?
 I have a table with entities , a table with atrributes and many table
 with value (one for datetime value,one for varchar value ,one for text
 value  etc. ).
 Can someone give me some suggestion about this?
 Many Thanks
 Marco

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How do I connect to a remote MySQL server?

2009-06-05 Thread Maine

Why not use SSH tunnel?
http://wiki.joyent.com/facebook:kb:mysql-tunnel
http://www.google.com/search?q=mysql+ssh

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake performance tips

2009-03-05 Thread Maine

Caching whole pages makes a difference: 
http://book.cakephp.org/view/346/Caching-in-the-Controller

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---