When "table name" is required to a "model entity" object, it throws a NPE if "datasource info" object is null.
JLR: I'm not quite sure in which occasions this fix is needed OOTB, but anyway it's safer indeed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040890 13f79535-47bb-0310-9956-ffa450edef68
- set delegator, dispatcher and security from session, servlet context or request's attribute to app context of birt engine before render and send email
- add the initialPath field to Tenant entity
- create the tenant context which as a default servlet using org.ofbiz.webapp.control.TenantServlet in the catalina container and check the multitenant property for initial the tenant context with root mount /
- move the changing a multi tenant delegator statement from ControlServlet to ContextFilter that could apply to every servlets
(implementation by Chattree Richard)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1032472 13f79535-47bb-0310-9956-ffa450edef68
normalized. This fixes oracle at startup, so that it doesn't wrongly
thing that no tables are defined in the database.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1005628 13f79535-47bb-0310-9956-ffa450edef68
passing any of the values thru the prepared statement; this meant that
toString() was being called, instead of the correct setFoo method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1005624 13f79535-47bb-0310-9956-ffa450edef68
The condition-object element used to have an attribute named "field-name" which was later replaced with "field" but the code was instead checking for "field-name" and then "name".
Fixed so that the code checks for "field" and then "field-name".
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@990347 13f79535-47bb-0310-9956-ffa450edef68
the entities defined in the group are what is passed to the helper for
checking, it makes no sense to have protection against a helper from
being checked multiple times.
Ideally, the proper fix would be to find all groups by helper, combine
all the entities together, then pass them to the helper in one shot.
However, with the new tenant system, this grouping needs to be done by
target database uri(and other parameters), not by helper name. This
might get done later.
Before this commit, any ofbiz installation that put multiple entity
groups into the same helper would only have the entities from the first
group get created.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@985298 13f79535-47bb-0310-9956-ffa450edef68
the Set used to track whether a helper had been checked was *inside* the
loop, so this optimization never actually did what was intended.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@981123 13f79535-47bb-0310-9956-ffa450edef68
partial fix, rhs can actually be *any* EntityConditionValue, so this
logic really needs to be revisited).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@980642 13f79535-47bb-0310-9956-ffa450edef68
If a user chooses to do so, they can assign the date-time field type to a CHAR(30) SQL type. This will enable sub-second Timestamp precision on databases that don't support it.
The Timestamp will be stored as a string in JDBC Timestamp format (yyyy-mm-dd hh:mm:ss.fffffffff). Date/time comparisons can still be performed in SQL statements, but any date/time functions performed on the field will fail. Users could create UDFs to mimic those functions.
In addition, the CHAR(30) field will consume more storage space than a native Timestamp field (usually 8 bytes).
It will be up to the user to decide if they want to use this feature. If used in a pure OFBiz environment, everything should work as expected.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@959868 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 commit will require anyone using the Advantage database to alter the data types on their existing database - which can be done with the Data Architect.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@958752 13f79535-47bb-0310-9956-ffa450edef68
hacked to work for functions back in 2007, but it was actually broke in
all cases. Undid the hack, and made it work correctly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@954956 13f79535-47bb-0310-9956-ffa450edef68