mirror of https://github.com/adamdruppe/arsd.git
remove redundant private
This commit is contained in:
parent
760880e87f
commit
66ff3fe9a5
|
@ -928,20 +928,18 @@ string toFieldName(T)(string s, bool isPlural = false)
|
|||
+/
|
||||
template one_to_many(alias fk_field, string t2 = null, string t1 = null)
|
||||
{
|
||||
private {
|
||||
alias T1 = __traits(parent, fk_field);
|
||||
alias T1 = __traits(parent, fk_field);
|
||||
|
||||
static assert(
|
||||
isFieldRefInAttributes!(__traits(getAttributes, fk_field)),
|
||||
T1.stringof ~ "." ~ fk_field.stringof ~ " does't have a ForeignKey");
|
||||
static assert(
|
||||
isFieldRefInAttributes!(__traits(getAttributes, fk_field)),
|
||||
T1.stringof ~ "." ~ fk_field.stringof ~ " does't have a ForeignKey");
|
||||
|
||||
alias FieldRef = getRefToField!(fk_field);
|
||||
alias T2 = FieldRef.Table;
|
||||
alias ref_field = FieldRef.field;
|
||||
alias FieldRef = getRefToField!(fk_field);
|
||||
alias T2 = FieldRef.Table;
|
||||
alias ref_field = FieldRef.field;
|
||||
|
||||
immutable string t2_name = toFieldName!T2(t2);
|
||||
immutable string t1_name = toFieldName!T1(t1, true);
|
||||
}
|
||||
immutable string t2_name = toFieldName!T2(t2);
|
||||
immutable string t1_name = toFieldName!T1(t1, true);
|
||||
|
||||
static immutable string one_to_many =
|
||||
T2.stringof~` get_`~t2_name~`(`~T1.stringof~` row, Database db)
|
||||
|
|
Loading…
Reference in New Issue