benerator is the tool to use, which is is very flexible though one needs to learn it pretty fast. with my above situation, in the xml file for benerator (that's what it uses ), i just write the following and i'm good to go. in fact, i can even now put ranges for made
, start
and end
dates. This is a section of a generate tag for 30 records of an entity (let's call it MY_ENTITY) with those dates
<import class="org.databene.commons.TimeUtil"/>
<generate name="MY_ENTITY" count="30" consumer="ENTITY_OUT">
<attribute name="MADE_DATE" type="date" script ="TimeUtil.today()" />
<variable name= "for_startDate" type="int" min="0" max="10" />
<attribute name="START_DATE" type="date" script="TimeUtil.addDays(this.MADE_DATE,
for_startDate)" nullable="false"/>
<variable name="for_endDate" type="int" min="1" max="10" />
<attribute name="END_DATE" type = "date" script="TimeUtil.addDays(this.START_DATE,
for_endDate)" nullable="false"/>
</generate>
and benerator supports many databases through JDBC, and it comes loaded with several JDBC drivers. try it here http://bergmann-it.de/test-software/index.php?lang=en. it's open source