The joins do not consider if the relationship they are pointing to belongs to another database (within the same server). Also if they have different prefixes, just add the prefix of the model where the join is made.