primary_column
attribute_values_id
=> {
data_type
=>
"integer"
,
is_auto_increment
=> 1,
};
column
attributes_id
=> {
data_type
=>
"integer"
,
};
column
value
=> {
data_type
=>
"varchar"
,
size
=> 255,
};
column
title
=> {
data_type
=>
"varchar"
,
size
=> 255,
};
column
priority
=> {
data_type
=>
"integer"
,
default_value
=> 0,
};
unique_constraint
attribute_values_attributes_id_value
=>
[
qw/attributes_id value/
];
belongs_to
attribute
=>
"Interchange6::Schema::Result::Attribute"
,
{
attributes_id
=>
"attributes_id"
},
{
is_deferrable
=> 1,
on_delete
=>
"CASCADE"
,
on_update
=>
"CASCADE"
};
has_many
product_attribute_values
=>
"Interchange6::Schema::Result::ProductAttributeValue"
,
{
"foreign.attribute_values_id"
=>
"self.attribute_values_id"
},
{
cascade_copy
=> 0,
cascade_delete
=> 0 };
has_many
user_attribute_values
=>
"Interchange6::Schema::Result::UserAttributeValue"
,
{
"foreign.attribute_values_id"
=>
"self.attribute_values_id"
},
{
cascade_copy
=> 0,
cascade_delete
=> 0 };
has_many
navigation_attribute_values
=>
"Interchange6::Schema::Result::NavigationAttributeValue"
,
{
"foreign.attribute_values_id"
=>
"self.attribute_values_id"
},
{
cascade_copy
=> 0,
cascade_delete
=> 0 };
sub
new {
my
(
$class
,
$attrs
) =
@_
;
$attrs
->{title} =
$attrs
->{value}
unless
defined
$attrs
->{title};
my
$new
=
$class
->
next
::method(
$attrs
);
return
$new
;
}
1;