File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1171,15 +1171,16 @@ private function mergeAfterSave($result)
1171
1171
/**
1172
1172
* Access or create a Relation value for a key.
1173
1173
*
1174
- * @param string $key The key to access the relation for.
1174
+ * @param string $key The key to access the relation for.
1175
+ * @param string $className The target class name.
1175
1176
*
1176
1177
* @return ParseRelation The ParseRelation object if the relation already
1177
1178
* exists for the key or can be created for this key.
1178
1179
*/
1179
- public function getRelation ($ key )
1180
+ public function getRelation ($ key, $ className = null )
1180
1181
{
1181
- $ relation = new ParseRelation ($ this , $ key );
1182
- if (isset ($ this ->estimatedData [$ key ])) {
1182
+ $ relation = new ParseRelation ($ this , $ key, $ className );
1183
+ if (! $ className && isset ($ this ->estimatedData [$ key ])) {
1183
1184
$ object = $ this ->estimatedData [$ key ];
1184
1185
if ($ object instanceof ParseRelation) {
1185
1186
$ relation ->setTargetClass ($ object ->getTargetClass ());
You can’t perform that action at this time.
0 commit comments