Dave Schoorl wrote: > I have just created my first two builders A and B, both existing > database tables have a single field VARCHAR primary key. When I run > mmbase, it says that the fields otype, number and owner are not present > in the database table and therefore treated as virtual.
That is very bad. It will not work with those fields virtual. > I now try to > model that A contains a field that is a foreign key to B. I guess I have > to use the NODE-type for that. However, since the relationship is over a > VARCHAR-field, I have no idea how to accomplish that. NODE-type fields are always supposing that records are identified with the number feld. > of A's builder file, describing the relationship, but as is, this is > (obviously) not working out. What do I have to do to make this work? It may be possible to trick MMBase in believing that there are actual mmbase tables by creating views, combining the existing data with stub-mmbase tables with at least those field s otype,number,owner, which must somehow also be filled if this other application is creating data. It should also be filled for data which is already existing, which would require some careful thinking as well. If this other application will actively update the data, you will have interesting problems any way, because mmbase must be notified that it should invalidate caches if something changes in its database. I think this all will be quite hard to do. Probably you'd be better of with some data-synchronization job or so. Michiel -- Michiel Meeuwissen mihxil' Peperbus 107 MediaPark H'sum [] () +31 (0)35 6772979 nl_NL eo_XX en_US _______________________________________________ Developers mailing list [email protected] http://lists.mmbase.org/mailman/listinfo/developers
