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 20
__construct(Structure $structure)
No description
at line 26
string|array|null
getPrimary(string $table)
Returns primary key for table.
at line 36
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 89
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.