[ic] Table creation error when using database mappings

Thomas Weiss pater.noster at gmx.net
Tue Dec 2 17:01:24 EST 2003


Hi all,

I'm using Interchange 4.9.9 with PostgreSQL. For internationalisation
I'm using the locale based database mappings found in the foundation
catalog. Now there is a problem when importing a database/table with
mappings into an sql database with support for transactions. The actual
problem is raised in Vend::Table::Common (in function
import_ascii_delimited()) when trying to call the commit() function on
the database table object, which for databases with mappings is
represented by Vend::Table::Shadow, which unfortunately doesn't
implement a commit() function.

Adding the following simple function to Vend::Table::Shadow resolves the
problem:

sub commit {
	my ($s) = @_;
	$s = $s->import_db() unless defined $s->[$OBJ];
	return $s->[$OBJ]->commit();
}

As I don't have a full understanding of Interchange's internals I would
like to know if this is the right way to fix this problem.

Bye,
Thomas


More information about the interchange-users mailing list