开发者

Can i use a Mage::getModel function on a View instead of a Table?

开发者 https://www.devze.com 2023-03-24 08:04 出处:网络
I created a mysql view that joins around 7 tables and i want to use theMage::getModel function on that view. Is it possible ? Also can i use the joi开发者_如何学JAVAnTable function on a mysql View ins

I created a mysql view that joins around 7 tables and i want to use the Mage::getModel function on that view. Is it possible ? Also can i use the joi开发者_如何学JAVAnTable function on a mysql View instead of a mySql Table ? any help will be appreciated !


You could probably create an entity around such a view, but you won't be able to write to the underlying data structures. Also, if this is an extension you intend to distribute, you may run into problems with permissions for creating views.

MySQL views are treated -- for the most part -- like tables, so yes you can join against a view.

Hope that helps!

Thanks, Joe

0

精彩评论

暂无评论...
验证码 换一张
取 消