From 2e46e4c1212c0d271b97bc242d53172328a1b53d Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 3 Oct 2002 11:25:38 +0000 Subject: [PATCH] Issue a warning to the event log if _table is not specified for a relational mapping --- src/helma/objectmodel/db/DbMapping.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/helma/objectmodel/db/DbMapping.java b/src/helma/objectmodel/db/DbMapping.java index a9c884d8..f065d319 100644 --- a/src/helma/objectmodel/db/DbMapping.java +++ b/src/helma/objectmodel/db/DbMapping.java @@ -150,6 +150,11 @@ public final class DbMapping implements Updatable { if (source == null) { app.logEvent ("*** Data Source for prototype "+typename+" does not exist: "+sourceName); app.logEvent ("*** accessing or storing a "+typename+" object will cause an error."); + } else if (table == null) { + app.logEvent ("*** No table name specified for prototype "+typename); + app.logEvent ("*** accessing or storing a "+typename+" object will cause an error."); + // mark mapping as invalid by nulling the source field + source = null; } }