Fixing generation of SetPrimaryFieldsChanged
This commit is contained in:
parent
7d7afbb2da
commit
2dee7aa756
|
@ -27,11 +27,9 @@ function supported_tokens()
|
|||
'bitfields',
|
||||
'cloneable',
|
||||
'virtual',
|
||||
'id',
|
||||
'owner',
|
||||
'pkey',
|
||||
'obscured',
|
||||
'diffable',
|
||||
'table_pkey',
|
||||
'bhl_bind',
|
||||
'cs_attributes',
|
||||
'cs_accessor_interface',
|
||||
|
@ -472,17 +470,8 @@ function fields_count_self(\mtgMetaStruct $struct)
|
|||
function is_primary_field(\mtgMetaStruct $struct, $fld)
|
||||
{
|
||||
$primary_fields = array();
|
||||
if($struct->hasToken("id"))
|
||||
$primary_fields[] = $struct->getToken("id");
|
||||
|
||||
if($struct->hasToken("owner"))
|
||||
$primary_fields[] = $struct->getToken("owner");
|
||||
|
||||
if($struct->hasToken("pkey"))
|
||||
{
|
||||
foreach(explode(",", $struct->getToken("pkey")) as $name)
|
||||
$primary_fields[] = $name;
|
||||
}
|
||||
if($struct->hasToken("table_pkey"))
|
||||
$primary_fields = explode(",", $struct->getToken("table_pkey"));
|
||||
|
||||
return in_array($fld->getName(), $primary_fields);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue