Skip to content

Conversation

@erizocosmico
Copy link
Contributor

If a parent Parent has many Child and Child does not have any
inverse relationship, the FK of Child it's not saved, even though
it is a virtual column. That's why only virtual columns for explicit
relationships were being added during the code generation step.
This, however, has changed so all of the virtual columns of a record
are added in inserts and updates (only once, of course).
Therefore, now relationships with no inverse relationships at all
can be used.

This fixes one of the bugs reported in #170

If a parent Parent has many Child and Child does not have any
inverse relationship, the FK of Child it's not saved, even though
it is a virtual column. That's why only virtual columns for explicit
relationships were being added during the code generation step.
This, however, has changed so all of the virtual columns of a record
are added in inserts and updates (only once, of course).
Therefore, now relationships with no inverse relationships at all
can be used.
@codecov
Copy link

codecov bot commented Jun 13, 2017

Codecov Report

Merging #172 into master will decrease coverage by 0.04%.
The diff coverage is 73.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
- Coverage   81.29%   81.24%   -0.05%     
==========================================
  Files          16       16              
  Lines        3410     3433      +23     
==========================================
+ Hits         2772     2789      +17     
- Misses        434      438       +4     
- Partials      204      206       +2
Impacted Files Coverage Δ
model.go 58.5% <100%> (+0.57%) ⬆️
store.go 87.26% <71.42%> (-1.75%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 356d0a6...8875c18. Read the comment docs.

@erizocosmico erizocosmico merged commit 03c536f into src-d:master Jun 13, 2017
@erizocosmico erizocosmico deleted the fix/rels-no-inverse-insert branch June 13, 2017 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants