[ 
https://issues.apache.org/jira/browse/OFBIZ-3245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781089#action_12781089
 ] 

David E. Jones commented on OFBIZ-3245:
---------------------------------------

This is an interesting change. 

Just to clarify: this is a change in the way the Entity Engine works from an 
external (ie API usage). Previously the Entity Engine expected you to pass a 
valid data type, would warn you if it wasn't what was expected (according to 
the fieldtypes*.xml file that was active), and then pass it on as-is to the 
JDBC driver to handle, or to blow up on. After this change the Entity Engine 
will attempt to convert whatever is passed in to whatever the JDBC driver 
expects.

Quick question: why not just convert to the java-type specified in the 
fieldtypes*.xml file?

Performance comment: doing a data type check and possible data type conversion 
will always be slower than what was done before; on a side note long if/else 
blocks do take a number of operations to work through, but switch statements 
are as close to free as you can get in terms of performance (usually a single 
low-level operation to jump to the desired code block); either way the 
performance impact of this will be so small compared to more expensive 
operations that are commonly done, like serialization/network/deserialization 
that the JDBC driver and database have to do, that I wouldn't expect to see any 
noticeable difference in performance

> Sandbox: Integrating The New Conversion Framework Into The Entity Engine
> ------------------------------------------------------------------------
>
>                 Key: OFBIZ-3245
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3245
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Adrian Crum
>            Assignee: Adrian Crum
>            Priority: Minor
>         Attachments: conversion.patch, conversion.patch
>
>
> This issue contains a patch intended for evaluation before it is committed. 
> See comments for details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to