Hi, In mysql server i have several databases like abc, xyz, pqr, etc.. and one database say lang_geo which contain language and geo table that are common to all other databases. so in 'abc' database i created the language table as follows:
CREATE TABLE `fd_language` (
`id` int(11) NOT NULL,
`name` varchar(250) NOT NULL,
`short` varchar(250) NOT NULL
) ENGINE=FEDERATED DEFAULT CHARSET=utf8 CONNECTION='mysql://user:[email protected]/lang_geo/language';
Everythings works fine till this, i can able to fetch language table data.also can insert new language row.
But i have a Product model which is in relationship with Language model so when i did something like:
$product = Product::findFirstById($product_id);
$lang_name = $product->Language->name;
I got $lang_name as undefined
Above relationship works when language table is within same database.
Can any body tell how to establish relationship in FEDERATED engine situation
Thanks