_id is free
This commit is contained in:
@@ -13,6 +13,10 @@ pub struct RelationshipHop {
|
||||
pub struct RelationshipLink {
|
||||
pub source_table: String,
|
||||
pub target_table: String,
|
||||
/// The column carrying the link, which is the name it was given. A table
|
||||
/// may link to one target several times, so the target's name does not
|
||||
/// identify the column.
|
||||
pub fk_column: String,
|
||||
}
|
||||
|
||||
pub fn resolve_relationship_path(
|
||||
@@ -53,7 +57,7 @@ pub fn resolve_relationship_path(
|
||||
from_table: table.clone(),
|
||||
to_table: next.to_string(),
|
||||
fk_source_table: link.source_table.clone(),
|
||||
fk_column: format!("{}_id", link.target_table),
|
||||
fk_column: link.fk_column.clone(),
|
||||
});
|
||||
if next == end {
|
||||
match_depth = Some(next_path.len());
|
||||
|
||||
Reference in New Issue
Block a user