Bug 1017647 - Invalid JPA mapping for ActvityType for MySQL [NEEDINFO]
Invalid JPA mapping for ActvityType for MySQL
Status: CLOSED NOTABUG
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: RT Governance (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Gary Brown
Jiri Sedlacek
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-10 05:38 EDT by Jiri Pechanec
Modified: 2015-08-02 19:45 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-31 11:46:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
gbrown: needinfo? (jpechane)


Attachments (Terms of Use)

  None (edit)
Description Jiri Pechanec 2013-10-10 05:38:36 EDT
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 06:03:12 EDT
A change of mapping was done in productization
Comment 2 Anne-Louise Tangring 2013-10-10 08:47:52 EDT
Not a beta blocker, this is advanced usage not thought to be used in beta.
Comment 3 Gary Brown 2013-10-10 09:13:50 EDT
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 12:27:29 EDT
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 11:46:24 EDT
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.