On 11 Jan 2007, at 00:11, Nilson Santos Figueiredo Junior wrote:

On 1/10/07, Mark Hedges <[EMAIL PROTECTED]> wrote:
Am I wrong that this idea is there are multiple identical tables
for the same class of object, and the search methods build
unions across the tables and send updates to the correct tables?

Well, in practice, the code I currently have relies on having a view
that has already been defined as the union across the tables, but the
updates are then sent to the correct tables. It also has some other
limitations which I don't remember right now - but it works.

I kind of prefer this approach since having a view can make things
cleaner since it's another layer of abstraction and is possibly more
efficient since the database could perform moro thorough optimizations
but I guess it'd do no harm if it could do both things (i.e. use a
view or generate the unions).

This is effectively emulating a very simple updatable view at the perl level. A switch to say whether it's already deployed to the DB so the SELECT can be generated appropriately would seem sane.

--
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for Catalyst, DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for details. + Help us build a better perl ORM: http://dbix- class.shadowcatsystems.co.uk/ +



_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to