Bug 1017647 - Invalid JPA mapping for ActvityType for MySQL [NEEDINFO]
Summary: Invalid JPA mapping for ActvityType for MySQL
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: RT Governance
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Gary Brown
QA Contact: Jiri Sedlacek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-10 09:38 UTC by Jiri Pechanec
Modified: 2015-08-02 23:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-31 15:46:24 UTC
Type: Bug
gbrown: needinfo? (jpechane)


Attachments (Terms of Use)

Description Jiri Pechanec 2013-10-10 09:38:36 UTC
When a user tries to run a query
SELECT act FROM BPMActivityType act LEFT JOIN FETCH act.properties where act.processType='{urn:switchyard-soa:rtgov_activity_generation:0.1.0}Process' ORDER BY timestamp DESC

An exception is thrown
11:16:10,855 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost/127.0.0.1:8080-1) SQL Error: 1054, SQLState: 42S22
11:16:10,855 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost/127.0.0.1:8080-1) Unknown column 'timestamp' in 'order clause'

The problem is that the column name in MySQL table is tstamp - instead of timestamp - but still property name is timestamp so it is not possible to refer to this field.

Comment 1 Jiri Pechanec 2013-10-10 10:03:12 UTC
A change of mapping was done in productization

Comment 2 Anne-Louise Tangring 2013-10-10 12:47:52 UTC
Not a beta blocker, this is advanced usage not thought to be used in beta.

Comment 3 Gary Brown 2013-10-10 13:13:50 UTC
Can you try adding 'act.' in front of the timestamp - e.g. "BY act.timestamp DESC" and let me know if that fixes for you - it works for me.

Comment 4 Gary Brown 2013-10-22 16:27:29 UTC
Have tested with the 'act.' prefix and it appears to resolve the problem, so have set the devel flag to '-'.

Comment 5 Gary Brown 2013-10-31 15:46:24 UTC
Don't believe this is a bug, but if further evidence becomes available then please reopen.


Note You need to log in before you can comment on or make changes to this bug.