To permit to use constant and SQL function in entities which has complex-alias fields.
-------------------------------------------------------------------------------------- Key: OFBIZ-1252 URL: https://issues.apache.org/jira/browse/OFBIZ-1252 Project: OFBiz Issue Type: New Feature Affects Versions: Release Branch 4.0 Environment: All Reporter: Fabien Carrion Priority: Minor Fix For: Release Branch 4.0 Attachments: sql_complexalias_constant_diff.patch.gz To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabien Carrion updated OFBIZ-1252: ---------------------------------- Attachment: sql_complexalias_constant_diff.patch.gz To permit to use constant and SQL function in entities which has complex-alias fields > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: Release Branch 4.0 > Environment: All > Reporter: Fabien Carrion > Priority: Minor > Fix For: Release Branch 4.0 > > Attachments: sql_complexalias_constant_diff.patch.gz > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-1252: ------------------------------- Fix Version/s: (was: Release Branch 4.0) Affects Version/s: (was: Release Branch 4.0) SVN trunk Changed version to Trunk since this is an improvement, not a bug fix. > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Priority: Minor > Attachments: sql_complexalias_constant_diff.patch.gz > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabien Carrion updated OFBIZ-1252: ---------------------------------- Attachment: (was: sql_complexalias_constant_diff.patch.gz) > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Priority: Minor > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabien Carrion updated OFBIZ-1252: ---------------------------------- Attachment: sql_complexalias_constant_diff.patch.gz Patch to implement this new Feature. The previous one was not my last version. This one is. > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Priority: Minor > Attachments: sql_complexalias_constant_diff.patch.gz > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532907 ] Jacques Le Roux commented on OFBIZ-1252: ---------------------------------------- Fabien, Please could you refer to http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices to build your patches ? (at least : no pathes, no tabs, 1 st line index only, not 3 lines) Thanks > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Priority: Minor > Attachments: sql_complexalias_constant_diff.patch.gz > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534598 ] Adam Heath commented on OFBIZ-1252: ----------------------------------- Do you have a use case or an example? I've looked at the patch, and it seems interesting, but I don't understand what you are trying to accomplish. I'm willing to get it applied, as I have several other improvements I want to do for the entity engine. > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Priority: Minor > Attachments: sql_complexalias_constant_diff.patch.gz > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabien Carrion updated OFBIZ-1252: ---------------------------------- Attachment: (was: sql_complexalias_constant_diff.patch.gz) > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Priority: Minor > Attachments: sql_complexalias_constant_diff.patch.gz > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabien Carrion updated OFBIZ-1252: ---------------------------------- Attachment: sql_complexalias_constant_diff.patch.gz Changing to coding style > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Priority: Minor > Attachments: sql_complexalias_constant_diff.patch.gz > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538197 ] Jacques Le Roux commented on OFBIZ-1252: ---------------------------------------- Also Fabien, Could you simply put your patches (without compressing them). Less work for us (especially for me : I use Windows) Is the way you do things (patches types, compressed) inherited from Tomcat habit (I know you are a Tomcat commiter) ? Thanks > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Priority: Minor > Attachments: sql_complexalias_constant_diff.patch.gz > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabien Carrion updated OFBIZ-1252: ---------------------------------- Attachment: sql_complexalias_constant_diff.patch Done with trunk version > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Priority: Minor > Attachments: sql_complexalias_constant_diff.patch > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabien Carrion updated OFBIZ-1252: ---------------------------------- Attachment: (was: sql_complexalias_constant_diff.patch.gz) > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Priority: Minor > Attachments: sql_complexalias_constant_diff.patch > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux reassigned OFBIZ-1252: -------------------------------------- Assignee: Jacques Le Roux > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Attachments: sql_complexalias_constant_diff.patch > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marco Risaliti updated OFBIZ-1252: ---------------------------------- Component/s: framework Fix Version/s: SVN trunk > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Components: framework > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: sql_complexalias_constant_diff.patch > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638883#action_12638883 ] Jacques Le Roux commented on OFBIZ-1252: ---------------------------------------- Hi Fabien, Sorry to be so late (near one year), but fortunately it is still mergeable without conflicts. I just did a 1st review of your patch and 2 points make me wonder. * Why do you need to do this ? {code} - <xs:attribute type="xs:string" name="entity-alias" use="required"/> - <xs:attribute type="xs:string" name="field" use="required"/> + <xs:attribute type="xs:string" name="entity-alias"/> + <xs:attribute type="xs:string" name="field"/> {code} * Are you sure that in {code} + if (fieldTypeBuffer.length() == 0) { + fieldTypeBuffer.append("currency-amount"); {code} currency-amount is the only case ? Moreover I'd really appreciate if you had an use-case or example as Adam already asked. Also I'm not sure this is not already (partially not sure for constants) accomplished as I see this in entitymodel.xsd {code} In every SELECT statement, the fields that are normally used are really defined to be expressions. This means for example that you can supply an expression like (discountPercent * 100) in place of just a field name. The complex-alias tag is the Ofbiz way to do this. The argument to the right of operator = can be any operator valid for that data type on the database system you are using. For example, *, +, -, and / are commonly available mathematical operators (min, max, sum, avg, count, count-distinct, upper, lower) You can also use any operator on any data type supported on the underlying database system including string and date operators. complex-alias can be as complex as you need by adding nested complex-alias statements and complex-alias-field can use the same functions (min, max, count, count-distinct, sum, avg, upper, and lower) as the alias tag. {code} What is for you an SQL function ? Thanks > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Components: framework > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: sql_complexalias_constant_diff.patch > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-1252. ---------------------------------- Resolution: Incomplete Seems that nobody is any longer interested > To permit to use constant and SQL function in entities which has complex-alias fields. > -------------------------------------------------------------------------------------- > > Key: OFBIZ-1252 > URL: https://issues.apache.org/jira/browse/OFBIZ-1252 > Project: OFBiz > Issue Type: New Feature > Components: framework > Affects Versions: SVN trunk > Environment: All > Reporter: Fabien Carrion > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: sql_complexalias_constant_diff.patch > > > To permit to use constant and SQL function in entities which has complex-alias fields. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |