DiscoveredConventions
class DiscoveredConventions implements Conventions
Discovers database conventions based on table structure metadata.
Methods
string|array|null
getPrimary(string $table)
Returns primary key for table.
array|null
getHasManyReference(string $nsTable, string $key)
Finds the referencing table and column for a has-many relationship by searching structure metadata.
array|null
getBelongsToReference(string $table, string $key)
Finds the referenced table and local foreign key column for a belongs-to relationship.
Details
at line 19
__construct(IStructure $structure)
No description
at line 25
string|array|null
getPrimary(string $table)
Returns primary key for table.
at line 35
array|null
getHasManyReference(string $nsTable, string $key)
Finds the referencing table and column for a has-many relationship by searching structure metadata.
Triggers structure rebuild if needed. Throws on ambiguous match.
at line 88
array|null
getBelongsToReference(string $table, string $key)
Finds the referenced table and local foreign key column for a belongs-to relationship.
Triggers structure rebuild if needed.