I doubt there is a hidden switch. I had the same problem, so I wrote a simple Perl script to figure it out:
my $in_file = $ARGV[0];
my $out_file = $ARGV[1];
my @identifiers;
open IN, "<$in_file";
while (<IN>) {
if ($_ =~ /<Table Name="(?:\w+\.)?(\w+)" Member="(\w+)"/) { push @identifiers, "$1 $2"; }
if ($_ =~ /<Function Name="(?:\w+\.)?(\w+)" Method="(\w+)"/) { push @identifiers, "$1 $2"; }
}
close IN;
open IN, "<$in_file";
open OUT, ">$out_file";
while (<IN>) {
my $line = $_;
foreach my $identifier (@identifiers) {
my ($new, $old) = split(' ', $identifier);
$line =~ s/"$old((?:Result)?)"/"$new$1"/g;
}
$line =~ s/<Parameter Name="(\w+)" Parameter="\w+"/<Parameter Name="$1" Parameter="$1"/;
print OUT $line;
}
close OUT;
close IN;
Just save it all to fdbml.pl, make sure you have ActiveState Perl installed, and then run this in your DBML file:
fdbml.pl old.dbml new.dbml
Ben
source
share