tags:

views:

21

answers:

1

Greetings earthlings,

For production we are using a Oracle database with some fancy stuff for IDs

@Id
@GeneratedValue(generator = "generator")
@GenericGenerator(name = "generator", strategy = "guid", parameters = {})
@Column(name="PROPERTY_ID")
private String propertyId;

For testing I thought I'd just use a H2 in memory database and how the ID is generated feels less important (not even sure guid would work with H2) so is it possible to have different setups for test and production?

:)

+2  A: 

You can map your entities (partially) in orm.xml, which would differ in the test resources folder (say src/test/resources). I'm not sure whether it will override the annotation if such exists, so give it a try.

Bozho
I'll try that :)
willcodejavaforfood