The main new features are:
Especially database data generation is strongly simplified: As a minimal setting you just need to define table name, database and the desired number of entries.
A syntax extension provides selector expressions that are evaluated dynamically and you may inline SQL code in benerator descriptor files. You can specify default generation for columns that appear in several tables (e.g. id, uuid, created_at, created_by...) and export generated data to SQL files too.
For all file references, relative URLs are now supported.
You can now inline scripts in SQL, Java, JavaScript, Java, Ruby, Python, Groovy, FreeMarker, Velocity, Tcl and many more.This comes at the price of requiring Java 6.
New name packages are included for Finnland, Sweden, Norway, Netherlands, Turkey and the Czech Republic.
Finally, some resource leaks and other bugs were removed.
changes
- softened dependency to POI (you need to explicitly define the dependency in your maven client project)
- Java 6
enhancements
- minimum setup requirements for creating entities (defaulting to increment id generator):
<database id="db" url="url" driver="driver" user="user" />
<create-entities name="table_name" count="10" consumer="db" />
- added createxml.sh
- supporting dynamic queries in selectors, e.g. selector="{{owner_fk = ${user.id}}}"
- improved convenience with new <execute> tag. It replaces the former use of RunSQLScriptTask
usage: <execute uri="drop.sql" target="db" onError="warn" />
- inlining of SQL, e.g.
<execute uri="create.sql" target="db" onError="fatal"><![CDATA[
CREATE TABLE TT (
ID NUMBER(10) NOT NULL,
NAME VARCHAR2(100) NOT NULL
);]]>
</execute>
- new common error handling mechanism, strategies: ignore, trace, debug, info, warn, error, fatal
- support for default component settings, e.g. for creating id and created_at for any entity the same way:
<defaultComponents>
<id name="ID" type="long" source="db" strategy="sequence" param="my_sequence"/>
<attribute name="CREATED_AT" generator="org.databene.benerator.primitive.datetime.CurrentDateGenerator"/>
</defaultComponents>
- simplified configuration
- type specification not necessary any more for any component with nullQuota="1"
- type specification for id only necessary for custom id-strategies
- script/program invocation
- inline SQL
- shell
- Defining default generators of attributes for all entities
- JavaBeans may be referenced as converters, several converters may be used in a comma separated list - they will be chained
<bean id="theConverter" class="my.SpecialConverter"/>
....
<create-entities name="user" source="myfile.csv" converter="org.my.Converter,theConverter"/>
- Validators now can be configured the same way like converters (see above)
- completed country database
- simplified id configuration, now even <id name="id/> is enough:
- default type: long
- default strategy: increment
- fallback to global IdProviderFactory if a specified IdProviderFactory does not support the specified strategy
- new name packages for:
- Finnland
- Netherlands
- Norway
- Sweden
- Turkey
- Czech Republic
- Generator and Validator for German tax id numbers (Steueridentifikationsnummer)
Read the 'file format' documentation for more detailed description.
bug fixes
(Find the tracker at http://sourceforge.net/tracker/?group_id=222964&atid=1057386)
- Several resource leaks
- Printing error messages also if RunSQLScriptTask.haltOnError=false
- bug fix in attribute generation order
- bug fix for Oracle schemas which are accessed by a user of another name





