Hi,
I've implemented the following custom property as shown below.
Creating a new property using varchar255 will add the column in the table. However disabling the new created property did not removed the column from entity table.
However enabling and disabling the default properties will add/remove the columns from entity table just fine.
Mihai,
/**
* Implemetation of hook_eck_property_types ($type, $schema)
*/
function eckextra_eck_property_types_alter(&$property_types) {
$property_types['varchar255'] = array(
'type' => 'varchar255',
'label' => 'Varchar 255',
'settings' => array(),
'class' => 'Varchar255PropertyType',
'file' => false,
'description' => '',
);
class Varchar255PropertyType implements PropertyType {
public static function schema() {
$schema = array(
'description' => 'Varchar',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
);
return $schema;
}
public static function validate($value) {
return TRUE;
}
}
Comments
Comment #1
fmizzell commentedI was not able to reproduce the issue. This is what I did:
This could be specific to your custom property (even through I did see anything odd about your code) or something specific about your overall set up.
Comment #2
legolasboClosing old issues. Please reopen the issue with a clear description and/or steps to reproduce if this issue is still relevant.
Comment #3
legolasbo