Skip to content

Commit 917b674

Browse files
committed
Adding more doc
1 parent 53f0fa1 commit 917b674

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/magic_join.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,17 @@ Now that you understand the concept, you should understand the power and the lim
6565

6666
<div class="alert alert-warning">MagicJoin is meant to be used on the 80% of the cases where writing joins is trivial
6767
and boring. If you have complex joins, do not try to use MagicJoin. Go back to pure SQL instead.</div>
68+
69+
###With great power comes great responsibility
70+
71+
MagicJoin is a powerful feature because it can **guess** what you want to do. Please be wise while using it.
72+
A change in your model could modify the shortest path computed by MagicJoin and therefore the returned SQL query.
73+
74+
If you database model is complex enough and is rapidly changing, generated queries could suddenly change in
75+
your application.
76+
77+
Please consider one of these 2 options:
78+
79+
- write unit tests (you have unit tests, don't you?)
80+
- use MagicJoin in development mode only. While developing, dump the SQL generated by MagicJoin and put it back
81+
in your code.

0 commit comments

Comments
 (0)