Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0018688
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. Platformmajorhave not tried2011-10-04 11:032011-11-04 13:57
ReporterazabaletaView Statuspublic 
Assigned Tomtaal 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision2b1b8ce0c943
ProjectionnoneETAnoneTarget Version3.0MP5
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0018688: Ability to call database functions from HQL query

DescriptionWhen creating a query/list widget, often it makes sense to use database functions. For example to calculate a project profitability. Now you cannot use this functions.
Steps To ReproduceCreate HQL query, and try to call a database function. It does not work.
Proposed SolutionLet the developer call database functions from HQL query.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0018900 newmarvintm Automatically register all sql functions at startup 
related to defect 0038520 closedcaristu Deprecate OBDal.registerSQLFunction 
related to defect 0045319 closedalostale junit test IssuesTest.test18688 is very slow and probably obsolete in the current form 

-  Notes
(0041483)
mtaal (manager)
2011-10-04 11:05

The solution is to make it possible to dynamically add sql functions to the loaded dialect, for this the dialect implementation has to be extended with a sql function registry method which can be called from the outside.

Also an example and howto has to be created to show/illustrate the behavior.

gr. Martin
(0041505)
shuehner (administrator)
2011-10-05 12:48

If possible we should try to maintain this list automatically either by reading the existing xml-files function headers of reading the relevant info's from the db.
(0041999)
mtaal (manager)
2011-10-23 10:02

Yes that would be best, we would also need to read type information for the input of the functions from the database. Is that possible?

gr. Martin
(0042051)
mtaal (manager)
2011-10-24 10:02

For MP5 it won't be possible to do an automatic read of function information. The question also if this is not too slow. So maybe for MP5 what we can do is add a function registry which should be called explicitly for each function, so that people at least can use functions, this until we have an automatic registration.

gr. Martin
(0042140)
mtaal (manager)
2011-10-27 11:25

Added documentation:
http://wiki.openbravo.com/wiki/Data_Access_Layer#SQL_Functions_in_HQL [^]

http://wiki.openbravo.com/wiki/Common_Issues_Tips_and_Tricks#SQL_Functions_in_HQL:_no_data_type_for_node_error [^]
(0042141)
hgbot (developer)
2011-10-27 11:27

Repository: erp/devel/pi
Changeset: 2b1b8ce0c943de61f676fa07a4ffa6a97ed9d180
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Oct 27 11:26:44 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2b1b8ce0c943de61f676fa07a4ffa6a97ed9d180 [^]

Fixes issue 18688: Ability to call database functions from HQL query

---
M src-test/org/openbravo/test/dal/IssuesTest.java
M src/org/openbravo/dal/service/OBDal.java
---
(0042149)
hgbot (developer)
2011-10-27 12:43

Repository: erp/devel/pi
Changeset: a40ff37ad5311b75127baa58e2c13f67ff1a59f6
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Oct 27 12:42:57 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a40ff37ad5311b75127baa58e2c13f67ff1a59f6 [^]

Related to issue 18688: Ability to call database functions from HQL query

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelInitializer.java
M src/org/openbravo/dal/core/DalSessionFactory.java
M src/org/openbravo/dal/service/OBDal.java
A modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ApplicationInitializer.java
A modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelApplicationInitializer.java
---
(0042579)
hudsonbot (developer)
2011-11-04 13:57

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/d10da320df2a [^]

Maturity status: Test
(0042582)
hudsonbot (developer)
2011-11-04 13:57

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/d10da320df2a [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2011-10-04 11:03 azabaleta New Issue
2011-10-04 11:03 azabaleta Assigned To => alostale
2011-10-04 11:03 azabaleta Modules => Core
2011-10-04 11:05 mtaal Note Added: 0041483
2011-10-04 11:05 mtaal Assigned To alostale => mtaal
2011-10-04 11:05 mtaal Target Version => 3.0MP5
2011-10-05 12:41 jmon Issue Monitored: jmon
2011-10-05 12:48 shuehner Note Added: 0041505
2011-10-05 12:49 shuehner Issue Monitored: shuehner
2011-10-23 10:02 mtaal Note Added: 0041999
2011-10-24 10:02 mtaal Note Added: 0042051
2011-10-27 11:25 mtaal Note Added: 0042140
2011-10-27 11:27 hgbot Checkin
2011-10-27 11:27 hgbot Note Added: 0042141
2011-10-27 11:27 hgbot Status new => resolved
2011-10-27 11:27 hgbot Resolution open => fixed
2011-10-27 11:27 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2b1b8ce0c943de61f676fa07a4ffa6a97ed9d180 [^]
2011-10-27 12:43 hgbot Checkin
2011-10-27 12:43 hgbot Note Added: 0042149
2011-10-27 13:01 shuehner Relationship added related to 0018900
2011-11-02 16:20 marvintm Status resolved => closed
2011-11-04 13:57 hudsonbot Checkin
2011-11-04 13:57 hudsonbot Note Added: 0042579
2011-11-04 13:57 hudsonbot Checkin
2011-11-04 13:57 hudsonbot Note Added: 0042582
2018-05-11 10:48 caristu Relationship added related to 0038520
2020-10-28 15:50 shuehner Relationship added related to 0045319


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker