IsraelOrtuno / Eavquent

EAV modeling package for Laravel and Eloquent – This package is abandoned, please use this fork https://github.com/rinvex/attributes
63 stars 13 forks source link

Store values into a {entity}_values table #10

Closed IsraelOrtuno closed 8 years ago

IsraelOrtuno commented 8 years ago

This could improve performance as every entity would have its own values table. Mostly when having a lot of entities, the current way could really affect performance.

IsraelOrtuno commented 8 years ago

cc: @dkulyk What do you think about this? This could result a little bit more difficult to handle, but we may result with this tables:

company -> company_values
employee -> employee_values

This way we can avoid having a crazily big property_values table... Maybe we can consider this for future versions.

dkulyk commented 8 years ago

Search index will occur quickly, regardless of the number of tables. You can make an optional functionality, the assignment tables in the model.

class Entity extends Model {
    use Propertier;
    protected $table_values = 'entity_values'; // property_values by default
}
IsraelOrtuno commented 8 years ago

True, will leave it in the backlog for now.

El martes, 2 de febrero de 2016, Dmytro Kulyk notifications@github.com escribió:

Search index will occur quickly, regardless of the number of tables. You can make an optional functionality, the assignment tables in the model. class Entity extends Model { use Propertier; protected $table_values = 'entity_values'; // property_values by default }

— Reply to this email directly or view it on GitHub https://github.com/IsraelOrtuno/Propertier/issues/10#issuecomment-178585118 .

Un saludo Israel Ortuño