Hello!
I'm having a problem with different queries being generated for exatly the same mapping. The problem is inconsistent and updating the mapping file (just rewriting it so that the timestamp is updated) suddenly solves the problem, but then it comes back again. Redeploying with the same file doesn't help.
This is a snippet from the initialisation of the mappings.
Code:
...
10:55:41,073 DEBUG| |org.hibernate.loader.entity.EntityLoader | Static select for entity com.sdi.salesreporting.common.service.SMSBO: select smsbo0_.msg_id as msg1_0_, smsbo0_.direction as direction1_0_, smsbo0_.flags as flags1_0_, smsbo0_.src as src1_0_, smsbo0_.dest as dest1_0_, smsbo0_.timestamp as timestamp1_0_ from queue smsbo0_ where smsbo0_.msg_id=?
...
10:55:40,505 DEBUG| |rg.hibernate.persister.entity.BasicEntityPersister| Snapshot select: select smsbo_.msg_id, smsbo_.direction as direction1_, smsbo_.flags as flags1_, smsbo_.src as src1_, smsbo_.dest as dest1_, smsbo_.timestamp as timestamp1_, smsbo_.msg as msg1_ from queue smsbo_ where smsbo_.msg_id=?
...
The first query is suppposed to look like this instead:
Code:
...
11:28:53,820 DEBUG| |org.hibernate.loader.entity.EntityLoader | Static select for entity com.sdi.salesreporting.common.service.SMSBO: select smsbo0_.msg_id as msg1_0_, smsbo0_.direction as direction6_0_, smsbo0_.flags as flags6_0_, smsbo0_.src as src6_0_, smsbo0_.dest as dest6_0_, smsbo0_.timestamp as timestamp6_0_, [b]smsbo0_.msg as msg6_0_[/b] from queue smsbo0_ where smsbo0_.msg_id=?
...
I'm running JBoss as server and the problem is the same both on windows and linux. A more detailed log is available at
http://www.paveldenisov.com/~storm/
Any help would be greatly appreciated!
Best regards,
storm