Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O2M MetaFile - file not uploaded when an entity in edit mode #108

Open
CITIZENGATE opened this issue Dec 7, 2021 · 0 comments
Open

O2M MetaFile - file not uploaded when an entity in edit mode #108

CITIZENGATE opened this issue Dec 7, 2021 · 0 comments

Comments

@CITIZENGATE
Copy link

CITIZENGATE commented Dec 7, 2021

Hi,

When an O2M field of MetaFile is used inside an entity, a file added in an existing entity is not uploaded. The file is uploaded only when the entity is created, not when updated.
It works on create and edit mode only if the field is M2M (not with O2M).

M2M field could be used as well, but using an O2M instead of a M2M allows the use of orphanRemoval="true".

    <module name="acme" package="org.acme.db"/>
    <entity name="TestMeta" lang="java" table="test_meta">     
          <string name="name" namecolumn="true"/>
         <one-to-many name="attachments" ref="com.axelor.meta.db.MetaFile" title="Attachments" orphanRemoval="true"/>
   </entity>

Thank u

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant