We have enabled flag in EntityEcaRule class, if its set false then entity eca rule will not be execute.
But there is not way to disable entity eca.
We can add enabled flag in Entity ECA definition to disable the existing entity eca rule.
Add new attribute on entity eca tag named enabled
Default value will be true for this.
If user want to disable existing OOTB entity eca rule, then user can define same rule in custom component and set the enabled=false
Also as per current flow if same seca rule is define more then once, system will execute all the rule, ideally it should not execute same rule (same rule, condition and action) if its defined more than one.
Also need to ovride hasCode, equals and toString method for EntityEcaRule, EntityEcaAction and EntityEcaCondition class file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814160 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9184)
Currently in the entitymodel.xsd the line
<xs:attribute name="entity-alias" type="xs:string"/>
is wrong, should be
<xs:attribute name="entity-alias" type="xs:string" use="required"/>
Else in line
this.entityAlias = entityAlias;
in ModelViewEntity.ViewConditionExpr()
this.entityAlias
receives null.
All supported branches are concerned
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1779625 13f79535-47bb-0310-9956-ffa450edef68
They are mapped to the Standard SQL:2011 EXTRACT function that is already supported by several DBMS including PostgreSQL and MySQL (but not yet Derby).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1644348 13f79535-47bb-0310-9956-ffa450edef68
This new implementation should be slightly more flexible but with default setup will end up with the same behavior as before 1627092.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1627489 13f79535-47bb-0310-9956-ffa450edef68
This is done by just setting the length of salt bytes to 0, but still
having a length byte prepended.
Add a feature to allow for certain fields to actually have a salt
prefix. This is enabled by setting encrypt=salt in the entity
definition.
This change is slightly incompatible with existing code. Old database
values will continue to be decrypted correctly. However, newly
encrypted values will no longer have a salt prepended, while originally
they would. This shouldn't be a problem in practice.
This change, along with the previous commit, finally allow for direct
lookup of encrypted values. However, already stored values will not be
found. To fix those, each database row will have to be read in by
ofbiz, then immediately written back out.
This is part two to completely fix OFBIZ-5959:
Person.socialSecurityNumber can't be used for findByAnd.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604968 13f79535-47bb-0310-9956-ffa450edef68
No matter how I set "sequence-bank-size" for an entity (in my example, its "EntityAuditLog"), the bank size is always default value "10".
It seems that this feature was lost by a serials update of revision 922724 to 922733 submitted by doogie.
jleroux: This thread http://markmail.org/message/ifosqek74gqtv7fz trace the root cause
Leon's fix is safe from a concurrency perspective. I just added a check on SequenceBank.maxBankSize and put some doc in the XSD
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1551744 13f79535-47bb-0310-9956-ffa450edef68
Change the existing code to support the different syntax variations, and add an attribute to the datasource element in the entityengine.xml file so that the proper variation can be chosen for each database.
Inspired by Moqui code. Test successful
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1422221 13f79535-47bb-0310-9956-ffa450edef68
debugResources is true which creates a DebugXAResource (that creates an Exception) , it should be false and made an option for debuging
jleroux: see comments in Jira 4282 for more
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1226234 13f79535-47bb-0310-9956-ffa450edef68
put different fields into different field sets, and when you select any
field in a particular set, all fields in that set will be fetched. This
also cascades upwards thru views, including alias-all and alias.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139922 13f79535-47bb-0310-9956-ffa450edef68
1. Removed the conversion framework from the entity engine. Type conversions should be done higher up in the stack. The basic pattern is the same, but instead of each ModelFieldType containing a converter instance, it now contains a JdbcValueHandler instance. The JdbcValueHandler performs the same task as the original switch statement - in effect each ModelFieldType contains its own piece of the switch statement.
2. Added two new field types: byte[] and Object. Originally, the Blob field type was a catch-all for multiple Java data types. This change disambiguates the field's contents.
This has been tested on Advantage, Derby, and MySQL. It should be completely backward compatible. I will be monitoring the dev mailing list closely for any problems.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@959470 13f79535-47bb-0310-9956-ffa450edef68
This patch provides the fundamentals to resolve an issue where the sorting of null values were inconsistent (sometimes sorting first and other times sorting last). Specifically, this patch allows one to create an order-by clause via any of the order-by elements of "-myField NULLS LAST" where this text parses out the - (as descending) and the "nulls last".
Since not all databases support the "nulls" argument on an order by clause (it was introduced as part of the OLAP support specification) , our entity-engine.xml file allows each data source to indicate if it has this support. If the support does not exist and nulls first/last is specified, the sql that is generated uses native sql to simulate the nulls first/last intent. At this time, the derby, postgres, and oracle databases are marked to use the nulls first grammar.
Right now, if you do not specify "NULLS XXX" in the field-name for the order-by it makes no change whatsever (naturally this assumption could be changed to have a default).
It should be noted, that my intent here was ultimately to "properly" model the order by into something whose xml representation could look something like ...
<entity-order-by field-name="fieldName" ascending="true" nulls-first="true" />
Divesh Dutta added a comment - 07/May/10 01:44 AM HI Bob, This patch works as expected for derby, postgres, and oracle databases as you have already mentioned. Cant we have some generic solution which supports all the databases. Or we can have some conditional code, where we can check which datasource is being used, and then generate the sql accordingly. Please let me know your views on this.
Bob Morley added a comment - 07/May/10 08:07 AM
Hi Divesh,
I added a more detailed description in the forum thread; but in brief this is a generic solution which supports all databases which generates the sql accordingly. What this patch does not do is apply a standard default order for all databases; it just adds support for one to dictate how they want the nulls sorted.
For example, when one sets the order-by they can set it to "lastName DESC NULLS FIRST" which should apply to all databases.
The thread Bob was referring above ends at http://markmail.org/message/47z7fwtawehuem6b
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950901 13f79535-47bb-0310-9956-ffa450edef68
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)
Of course this effort to remove trailing spaces has no functional implications.
Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {
So these changes are also in this commit, should not be a problem anyway.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68