Commit Graph
40 Commits
Author SHA1 Message Date
Jacques Le Roux 180ca716cc Improved: Change current view-link requirement to allow use of
entity-condition only in view-entities
(OFBIZ-11179)



To explain the subject, i will give an example encountered recently:

We used, for a customer project, a view with Agreement, Virtual and Variant 
product entities and where the agreement can be attached to a virtual OR a 
variant product.
So to make a view returning Variant Product, Virtual Product AND Agreement 
informations, i could not create a view, as the key-map link is mandatory and 
made it impossible.

I can not have an alternative relation to the same entity so we have to 
duplicate member-entity and an alternative relation path. 
The result is a complicated and ugly entity-view

I think this can have been much simpler if i could have done it directly 
through the entity-condition (see the AGPA/PDTA view link in attached file 
ExampleWithoutKeyMap.xml)

So the purpose is to add the possibility to create a view-link without key map,  
if there is an entity-condition.

You can test by applying the given patch and add the entity view from attached 
file ExampleWithoutKeyMap.xml

Thanks: Leila Mekika

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866439 13f79535-47bb-0310-9956-ffa450edef68
2019-09-05 07:13:10 +00:00
Jacques Le Roux b0478d13f0 Improved: XML schemas should use predefined boolean type
(OFBIZ-10411)

To define boolean values, some ad-hoc enumeration of "true" and "false" are 
repeatedly used.  Since XML Schema defines a standard boolean datatype it's 
better to use it.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846727 13f79535-47bb-0310-9956-ffa450edef68
2018-11-16 16:38:24 +00:00
Jacques Le Roux c15fafa454 Documented: Remove unnecessary field types
(OFBIZ-9351)

Removes the reference to id-ne similar field types. They will be removed and
replaced by simple id field types.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1794377 13f79535-47bb-0310-9956-ffa450edef68
2017-05-08 14:16:37 +00:00
Jacques Le Roux 6dbbf2ee8f Fixed: In entitymodel.xsd entity-alias for condition-expr must be required
(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
2017-01-20 14:20:47 +00:00
Arun Patidar 3865ff485d [OFBIZ-6171] Applied patch from Pierre Smits for replacing 'Open for Business' references with 'Apache OFBiz'.Thanks Pierre for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1706589 13f79535-47bb-0310-9956-ffa450edef68
2015-10-03 14:15:21 +00:00
Jacopo Cappellato 79dd228162 OFBIZ-5146: added support for three new ModelViewEntity functions for the extraction of year, month, day from a date field: extract-year, extract-month, extract-day.
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
2014-12-10 08:25:45 +00:00
Adam Heath 5bc5c4151f Change encrypt=true fields to no longer have a pre-pended salt value.
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
2014-06-24 00:23:23 +00:00
Jacques Le Roux d7782d5fb9 Completes OFBIZ-5648 - Extend primary keys, removes trailing blanks
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1597273 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 09:51:48 +00:00
Jacques Le Roux 79365e65da Completes OFBIZ-5648 - Extend primary keys, by adding XSD documentation about current restrictions
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1597270 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 09:14:22 +00:00
Jacques Le Roux 3d458932c5 A slightly modified patch from Leon for "sequence-bank-size attributes does not work anymore" https://issues.apache.org/jira/browse/OFBIZ-5429
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
2013-12-17 22:45:20 +00:00
Adrian Crum 771000f8f0 Allow redefinition of view entities. XML schema change only - implementation exists already.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530976 13f79535-47bb-0310-9956-ffa450edef68
2013-10-10 13:41:45 +00:00
Adrian Crum ca716388f8 Added a new attribute to the entity definition - "redefinition" - which will suppress "Entity is defined more than once" warnings.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1362772 13f79535-47bb-0310-9956-ffa450edef68
2012-07-18 05:42:24 +00:00
Erwan de Ferrieres 4162e44a47 A patch from Youssef Khaye - OFBIZ-4573 - complex-alias does not allow to do (discountPercent * 100) as stated in xsd
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1205156 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 20:41:14 +00:00
Adam Heath 7e99311694 FEATURE: Add field-set feature to entity engine. You can now
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
2011-06-26 19:19:06 +00:00
Jacques Le Roux 5c8fbb779d Fix the comment of the not-null attribute (field element)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1100729 13f79535-47bb-0310-9956-ffa450edef68
2011-05-08 13:01:30 +00:00
Jacques Le Roux f28b0343e1 A patch from Deyan "Allow attributes enable-lock, no-auto-stamp, auto-clear-cache, never-cache and sequence-bank-size in <extend-entity> tag in entitydef.xml fields " (https://issues.apache.org/jira/browse/OFBIZ-3882) - OFBIZ-3882
Allow attributes
enable-lock
no-auto-stamp
auto-clear-cache
never-cache
sequence-bank-size

in <extend-entity> tag in entitydef.xml fiels

Example: <extend-entity entity-name="Person" enable-lock="true" sequence-bank-size="1" />

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1062863 13f79535-47bb-0310-9956-ffa450edef68
2011-01-24 16:33:16 +00:00
Andrew Zeneski 0c211fb4e9 implemented option to specific a specific entity should NOT be checked; no columns are to be updated and ignore any warning about fields, relations, keys, etc. This is useful when an entity is defined based on a database view; the view may not (or probably will not) appear in the table meta data and any attempt to auto-create the entity will (or should) fail.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1042792 13f79535-47bb-0310-9956-ffa450edef68
2010-12-06 21:07:48 +00:00
Adam Heath 4488c44a32 Add support for UPPER and LOWER functions in index fields.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948440 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 14:22:21 +00:00
Erwan de Ferrieres e2f65a76a3 Adding dependent-on on extend-entity (OFBIZ-3303)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916646 13f79535-47bb-0310-9956-ffa450edef68
2010-02-26 11:17:26 +00:00
Andrew Zeneski 77ca6da64d extend-entity can now override the default-resource-name attribute
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916049 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24 23:59:58 +00:00
Adam Heath db585f5d95 Oops, shouldn't have checked these 2 lines in.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@821577 13f79535-47bb-0310-9956-ffa450edef68
2009-10-04 19:04:08 +00:00
Adam Heath 11df2b159a Make 2 reusable schema types, boolean, and aggregate-function.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@821576 13f79535-47bb-0310-9956-ffa450edef68
2009-10-04 19:01:44 +00:00
Adam Heath 5a30fec5d9 Bother, forgot to allow default-resource-name at the top level.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@821406 13f79535-47bb-0310-9956-ffa450edef68
2009-10-03 20:05:58 +00:00
David E. Jones d83da9a32a Added some notes on additional things to add
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@792394 13f79535-47bb-0310-9956-ffa450edef68
2009-07-09 04:28:27 +00:00
David E. Jones bc8b260f8d Some cleanups of the design for the entity-condition stuff; I should have reviewed and cleaned up this XSD more before doing the last commit as there are a number of things that did not work and are not useful in this context from the entity-condition patterns used in the widgets and simple-methods; the implementation is not updated yet for these changes but will be soon; while not all of the changes here are supported yet the ones that are removed were things that did not work anyway; in the mean time feedback on the design is welcome
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@792116 13f79535-47bb-0310-9956-ffa450edef68
2009-07-08 12:41:04 +00:00
David E. Jones 7e981d3cb3 Added ability to specify an entity-condition as part of a view-entity in order to encapsulate a full query definition in a view-entity
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@790472 13f79535-47bb-0310-9956-ffa450edef68
2009-07-02 06:43:50 +00:00
Jacques Le Roux b9c3ddef08 2d part and end of an effort to remove trailing spaces
[ \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
2009-04-08 10:54:51 +00:00
Jacques Le Roux c6adcaaa0e Revert r707216 on Adam and David's advices (OFBIZ-1232)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@707830 13f79535-47bb-0310-9956-ffa450edef68
2008-10-25 10:02:40 +00:00
Jacques Le Roux b3a8df1ef9 Merged and modified Oscar Pablo's patch from "Data filtering in entity views" (https://issues.apache.org/jira/browse/OFBIZ-1232) - OFBIZ-1232
I put documentation in entitymodel.xsd, removed the need for an iterator, and strengthened makeViewFilterWhereClause.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@707216 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22 22:22:00 +00:00
Jacques Le Roux fa9e4bccb9 A patch from Michael Imhof "Entity declaration: NOT NULL Fields on database" (https://issues.apache.org/jira/browse/OFBIZ-747) - OFBIZ-747
This is simple, clear and may turn useful in some cases. It can't hurt anything but will only work on a new data base.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@707135 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22 17:03:27 +00:00
David E. Jones 3b7660fc3b Added feature to entity engine to support generic audit log that can be used for any field; values are converted to a string and l using the enable-audit-log attribute on the entity->field element; the Testing entity uses it now for the testName; this also has functionality to associate user info like the userLoginId with the thread so that the EE knows about it automatically, and uses a stack for flexibility
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@652226 13f79535-47bb-0310-9956-ffa450edef68
2008-04-30 02:02:29 +00:00
Jacques Le Roux f520931be7 Slightly modified annotation/documentation for complex-alias from Skip Dever proposition in "Additional documentation for View entities"https://issues.apache.org/jira/browse/OFBIZ-1419
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@597488 13f79535-47bb-0310-9956-ffa450edef68
2007-11-22 21:03:57 +00:00
Jacopo Cappellato 24724bfa46 Added 'description' field and accessor methods to the ModelField and ModelViewEntity.ModelAlias classes to store the field level description specified in the entity definition (<description></description> tags).
Added new optional attributes to the alias-all element: function and group-by. If specified then to all the aliased fields the function and/or group-by element will be applied.
In ModelViewEntity, added new method to get the list of group-by fields as a subset of the passed in list: this is useful to get the list of group-by fields limited to the felds that are in the select clause.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@584700 13f79535-47bb-0310-9956-ffa450edef68
2007-10-15 07:28:48 +00:00
David E. Jones 2d744d0102 Added sequence-bank-size to configure sequence bank sizes on a per-entity basis
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@573785 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 05:32:53 +00:00
Jacques Le Roux dad67935f7 A (large) patch from Scott Gray "Update ASL header" (https://issues.apache.org/jira/browse/OFBIZ-637).
I put also some svn:ignore for shark build and lib diretories and assetmaint/build 

I did some by hand lately, too much to remember. They were files with old header but without copyright. A 1st attempt I suppose, will have to check this after this commit.

I add some problems to commit this patch in one piece because it's so huge (specially with Eclipse I had to turn to Tortoise) !

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@499486 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 17:15:54 +00:00
David E. Jones 2fb751a670 Applied patch from Leon Torres, with small change, to implement new default value feature for complex aliases in view entities; Apache Jira #OFBIZ-336
git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@451767 13f79535-47bb-0310-9956-ffa450edef68
2006-10-01 16:56:16 +00:00
Jacopo Cappellato 1b03b7e9dc License change from BSD to ASL2.0: this is an important commit since now the license switch is complete.
OFBiz is now licensed under the Apache Software License 2.0

git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@439557 13f79535-47bb-0310-9956-ffa450edef68
2006-09-02 08:17:46 +00:00
David E. Jones 5360305496 Implemented extend-entity for entity definitions to support adding field, relation and index elements to an entity; this is now also used to support further separation of the framework from the applications
git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@431009 13f79535-47bb-0310-9956-ffa450edef68
2006-08-12 10:36:00 +00:00
David E. Jones 879262571b Added example view-entity, including a complex-alias to test that; based on that in the Entity Engine fixed some stuff that is part of the caching code that was breaking things on startup; the conversion stuff that is part of the entity cache is now just disabled (and with a TODO in the code) for field aliases in a view entity that are complex aliases (ie made of multiple fields), to implement that more expression evaluation will have to be done
git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@430913 13f79535-47bb-0310-9956-ffa450edef68
2006-08-11 23:04:08 +00:00
David E. Jones 94fe6d1cda Initial OFBiz import from revision 7923 of the old svn.ofbiz.org SVN repository.
git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@418498 13f79535-47bb-0310-9956-ffa450edef68
2006-07-01 19:05:20 +00:00