throw new SQLException ("Error retrieving DB scheme for "+this);
throw new SQLException ("Error retrieving columns for "+this);
    public synchronized String[] getColumns() throws ClassNotFoundException, SQLException {	if (!isRelational ())	    throw new SQLException ("Can't get Schema for non-relational data mapping");	if (source == null && parentMapping != null)	    return parentMapping.getColumns ();	// Use local variable cols to avoid synchronization (schema may be nulled elsewhere)	if (columns == null) {	    // we do two things here: set the SQL type on the Relation mappings	    // and build a string of column names.	    Connection con = getConnection ();	    Statement stmt = con.createStatement ();	    ResultSet rs = stmt.executeQuery ("select * from "+getTableName()+" where 1 = 0");	    if (rs == null)	        throw new SQLException ("Error retrieving DB scheme for "+this);	    ResultSetMetaData meta = rs.getMetaData ();	    // ok, we have the meta data, now loop through mapping...	    int ncols = meta.getColumnCount ();	    columns = new String[ncols];	    for (int i=0; i<ncols; i++) {	        columns[i] = meta.getColumnName (i+1);	        Relation rel = columnNameToRelation (columns[i]);	        if (rel == null || (rel.reftype != Relation.PRIMITIVE &&	                            rel.reftype != Relation.REFERENCE))	            continue;	        rel.setColumnType (meta.getColumnType (i+1));	    }	}	return columns;    }