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 <[email protected]> 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 <[email protected]> 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, "[email protected]"
>
> > <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to