// Sun doen't really support generated primary keys, so we need to add them by hand here
Set<String> generatedPks = new HashSet<String>(Arrays.asList("BasicCmp2", "AOBasicCmp2", "EncCmp2", "Cmp2RmiIiop"));
EntityMappings cmpMappings = appModule.getCmpMappings();
for (Entity entity : cmpMappings.getEntity()) {
if (generatedPks.contains(entity.getName())) {
entity.getAttributes().getId().get(0).setGeneratedValue(new GeneratedValue(GenerationType.IDENTITY));
}
}
String actual = toString(cmpMappings);
Diff myDiff = new Diff(expected, actual);
assertTrue("Files are similar " + myDiff, myDiff.similar());