Skip to content

Commit db419a1

Browse files
authored
Merge pull request #406 from A-Baji/read-32-bit-flag
check `fks.aliased` as matrix
2 parents 49e583e + a3b4c20 commit db419a1

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

+dj/Relvar.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function cleanup(self)
9292
@(x) strcmp(x.from, rels(ix).fullTableName), ...
9393
self.schema.conn.foreignKeys, 'uni', true);
9494
fks = self.schema.conn.foreignKeys(fk_index);
95-
if ~fks.aliased
95+
if ~all([fks.aliased])
9696
% If matched foreign keys are not aliased, no renaming
9797
% necessary. Restrict table based on normal projection.
9898
rels(ix).restrict(proj(rels(i)));

tests/test_schemas/+TestLab/Duty.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
%{
2+
duty_date: date
3+
-----
4+
(duty_first) -> TestLab.User(user_id)
5+
(duty_second) -> TestLab.User(user_id)
6+
%}
7+
8+
classdef Duty < dj.Manual
9+
end

tests/test_schemas/+TestLab/User.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
%{
2+
user_id: varchar(32)
3+
%}
4+
5+
classdef User < dj.Manual
6+
end

0 commit comments

Comments
 (0)