Johannes Verelst wrote:
I have added a new database implementation to mmbase HEAD. This version
uses Views to implement builder inheritance.


mazing ... I just did the exact same thing last week and didn't commit it to
CVS yet :). I was about to present it as a hack; but that won't be
necessary anymore. What versions of oracle did you test this against?

I see that your solution doesn't use triggers at all; mine does. I am
creating triggers like this:
 CREATE TRIGGER mm_news_insert
   instead of insert on mm_news
   for each row
   begin
     insert into mm_news_t (m_number, title, subtitle, intro, body)
     values (:NEW.m_number, :NEW.title, :NEW.subtitle, :NEW.intro, :NEW.body);
     insert into mm_object (m_number, otype, owner)
     values (:NEW.m_number, :NEW.otype, :NEW.owner);
   end mm_news_insert;

That will make sure that an insert on the mm_news also inserts into
the object table. This means that you won't have to do loop of inserts
into all parent builders (like the mysql solution).

My version is based on the old SQL92WithViews class. That one didn't use triggers to do the insert. It is nicer to solve the insert problem inside the database so yours is probably much better :-) I think only Vodafone is using the SQL92WothViews class so they have only a problem upgrading to 1.8

If your version also works on mssql then we should replace my version with yours.

I also wrote a sqlhandler that can deal with limit and offset by using
some 'rownum' magic. I am still willing to commit that if you agree.

That is what I meant with missing functionality

Nico
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to