auto selected generators

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

auto selected generators

Postby rjschave » Fri Apr 18, 2008 7:11 am

I have several integer fields in a table that contain the words Length or Width in the field name. the program correctly selects the SQL int data generator for the Length fields, but selects the Business ID generator for the width fields.

I'm not sure why the word 'width' in the field name triggers the Business ID generator instead of the SQL int generator. What criteria is used to determine when a business generator is used over a SQL datatype generator? Is this a settings that can be modified?
rjschave
 
Posts: 7
Joined: Tue Apr 15, 2008 6:52 am

Postby benhall » Fri Apr 18, 2008 10:54 am

Hello,

Thank you for your post. Within the config directory of the application we have defined all of the generators as XML and set various properties which are loaded when the application starts.

For Business IDs (Ids.xml), we have a setting saying what to match the generator to. For this generator, it is:

" <matches field="ID" score="5" /> "

As width contains ID within the field name, the generator is automatically matching to the field name.

You can modify this by removing the configuration, I'll investigate the matching more to see if it can be improved.

Thanks

Ben
benhall
 
Posts: 69
Joined: Fri Dec 14, 2007 11:15 am

Postby rjschave » Fri Apr 18, 2008 6:50 pm

Interesting. Thanks for the tip. I suppose normally it wouldn't be a big deal, but this table has over 12 fields with the word 'width' in the name so changing the generator was getting monotonous.

It sounds like your matching if the field name contains a value. Consider adding options for begins with and ends with.
rjschave
 
Posts: 7
Joined: Tue Apr 15, 2008 6:52 am


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 0 guests

cron