[jira] [Commented] (OFBIZ-6510) Replace webtools/control/view/ModelInduceFromDb with widgets

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-6510) Replace webtools/control/view/ModelInduceFromDb with widgets

Nicolas Malin (Jira)

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

ASF subversion and git services commented on OFBIZ-6510:
--------------------------------------------------------

Commit e786da42e852fbf4723dc0b9680e432ea24b61a8 in ofbiz-framework's branch refs/heads/trunk from bjugl
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=e786da4 ]

Fixed: Induction from DB does not represent relations properly. (#290) (OFBIZ-12178)

As encountered in OFBIZ-6510, the ModelInduceFromDb does currently not include entity relations and foreign key constraints. Since they are an important part of the database model, we should fix that.

I could track down the problem to an incomplete invocation of the ModelEntity through the constructor used in the DatabaseUtil.induceModelFromDb() Methods. This constructor does not initialize the Relations.

Problem is, that the ModelEntity initialized through the "DB Names Constructor" does not cover references in its current state at all.

While working on an implementation I realized, that the API is not very congruent in this regards. I would expect that I could initialize ModelRelations the same way ModelFields are initialized in this context:

The create() Method takes a ModelEntity, DatabaseUtil.ColumnCheckInfo (respectively a DatabaseUtil.ReferenceCheckInfo) and a ModelFieldTypeReader (that could be left out for references) and creates ModelField (ModelRelation) objects that are added to the ModelEntity.

But that is not the case at the moment. On one hand not all fields that would be necessary are covered in the DatabaseUtil.ReferenceCheckInfo Objects (e.g. "type" is missing), on the other the object is missing public getters to make the values available in the first place.

Thanks a bunch Benjamin, nice add !


> Replace webtools/control/view/ModelInduceFromDb with widgets
> ------------------------------------------------------------
>
>                 Key: OFBIZ-6510
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6510
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Release Branch 18.12, Trunk
>            Reporter: Christian Carlow
>            Assignee: Michael Brohl
>            Priority: Major
>              Labels: backport-needed
>             Fix For: 18.12.01, Upcoming Branch
>
>         Attachments: OFBIZ-6510.patch, OFBIZ-6510.patch, OFBIZ-6510.patch, OFBIZ-6510.patch
>
>
> The page is written in JSP probably from very long ago when FTL and widgets didn't even exist yet.  It should be implemented in widgets now that they are available.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)