As foreign keys may require database access in order to get their value, you have to use this function. The regular DataField#get() won't work at all times. @param context Context of the application. @return An instance of the references model or null if nothing cou
(Context context)
| 83 | * if nothing could be found. |
| 84 | */ |
| 85 | public T get(Context context) { |
| 86 | if(mValue == null) { |
| 87 | return Model.objects(context, mTarget).get(mReference); |
| 88 | } |
| 89 | |
| 90 | return mValue; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Creates the foreign key constraint for the database. |