Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

related record

posted by mungiu 7 years ago

I'm doing something wrong or is't posible to use prebuild for related of related table?

$users = User::getAll("User");
$comments = $users->prebuildComments("r");
$picture = $users->prebuildPictures("u");
$likes = $picture->prebuildLikes("p");

You can do it using the preload Preloading Related Records but you need to create the relations in your schema.

Paste your DDL in here so we can help you.

posted by jmtucu 7 years ago

So let me explain again i have users users have picture and picture have likes, how can i get an object with user with picture and picture with likes in same object? i have relation in my schema already.

posted by mungiu 7 years ago