Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] questions while running JPA JUnit tests

Thanks Andrei, Tom,

This might have worked, but not completely.

I added a @TableGenerator annotation to a entity that is used by one of the first tests, an entity that did not have a pk with a generated value.

I then ran the full JPA test set. Looking at the logs, all three tables were created at some stage: the table from the new annotation, the table in TableSequence.defaultTableName and the table I have in Symfoware platform's createPlatformDefaultSequence().

For now I'm still using a value in defaultTableName that Symfoware accepts. I'll try later to revert it to the original to see what tests depend on this sequence table.


On 19/12/2009 03:52, Tom Ware wrote:
Hi Dies,

Andrei just pointed out a potential workaround for the issue with
MetadataProject issue below that could allow us to run the tests without
changing every table generator that uses defaults.

The JPA processing uses a generator called "SEQ_GEN" by default. It
might be possible to define this sequence generator in an annotation or
in xml somewhere in the tests and override the default names. That
generator could be used to override the reserved words.


Tom Ware wrote:
Hi Dies,

Dies Koper wrote:
Hi Tom,

I have checked in your code.


Andrei pointed our an issue with the checked-in code. MetadataProject
has a change to try to get the default sequence table from the
Platform. This issue is that this code is generally called before the
platform has been set. (i.e. it will always be DatabasePlatform and
never a subclass) I cannot think of a good solution for this issue
other than to have symfoware users not use the default sequence table
name - this is not an area we would want to change the default for
other users for backwards compatibility reasons.

Back to the top