Prepared for JOIN operation. Entity generation is OK, the rest needs work!