You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2012/09/03 08:57:07 UTC

[jira] [Commented] (OFBIZ-5010) Entity-Auto Engine : manage [create|lastModified]Date field

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

Jacques Le Roux commented on OFBIZ-5010:
----------------------------------------

Hi Nicolas,

Your patch looks good to me, just wondering:

{code}
+                    if (modelEntity.getField("createdByUserLogin") != null) {
+                        GenericValue userLogin = (GenericValue) parameters.get("userLogin");
+                        if (userLogin != null) {
+                            newEntity.set("createdByUserLogin", userLogin.get("userLoginId"));
+                            if (modelEntity.getField("lastModifiedByUserLogin") != null) {
+                                newEntity.set("lastModifiedByUserLogin", userLogin.get("userLoginId"));
+                            }
+                        }
+                    }
{code}

The ValueLinkKey entitiy has lastModifiedByUserLogin but not createdByUserLogin. Not sure if it's an error for this entity (most likely) or if you code should adapt. Also I'm not sure what lastModifiedByTerminal is used for. Unfortunately this entity is from the pre Apache era, harder to track in a limited time...
                
> Entity-Auto Engine : manage [create|lastModified]Date field
> -----------------------------------------------------------
>
>                 Key: OFBIZ-5010
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5010
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Malin
>              Labels: service-engine
>         Attachments: OFBIZ-5010.patch
>
>
> When a entity have fields createDate, lastModifiedDate, createByUserLogin and updateByUserLogin, the entity-auto engine set them.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira