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

Damascus v.1.1.4 fails to create two or more records #93

Closed
icarrara opened this issue Dec 10, 2019 · 4 comments
Closed

Damascus v.1.1.4 fails to create two or more records #93

icarrara opened this issue Dec 10, 2019 · 4 comments
Assignees
Labels

Comments

@icarrara
Copy link

icarrara commented Dec 10, 2019

From the sample, there are the Employee model and Position model.

The below steps are valid for every entities (Employee, Position, DeepPosition).

Deploy the portlet and create a first record in Employee entity and leave empty the "Title" and "Summary" Damascus's auto-generated fields.

Then try to create a second record in Employee entity and leave empty the "Title" and "Summary" Damascus's auto-generated fields. - you get the duplicate error message:
Duplicate entry '20124-0' for key 'IX_26F09727' because the 'urlTitle' field is everytime '0'.

The User needs to put something to avoid the error: Duplicate entry '20123-0' for key 'IX_A548BA27 - assuming there is one record already in place without content in "Title" and "Summary" Damascus's auto-generated fields.

The User needs to put something different from other records in those fields to avoid the error: Duplicate entry '20123-position-five' for key 'IX_A548BA27 - assuming there is one record already in place with "position-five" content in "Title" and "Summary" Damascus's auto-generated fields.

@icarrara icarrara changed the title From nested third level of entities Damascus v.V1.1.3 fails to create two or more records From nested third level of entities Damascus v.1.1.3 fails to create two or more records Dec 10, 2019
@icarrara
Copy link
Author

base.json.txt

@icarrara
Copy link
Author

icarrara commented Dec 13, 2019

Using Damascus V.1.13 the issue is still here.
#89 doesn't solve the issue.

The issue affect every level of relationship between entities, for example Employee, Position, DeepPosition (an eventual third level of relatinship - the parent entity is Position).

In every entity, in "Edit" screen Damascus creates two fields:
immagine

The User needs to put something to avoid the error: Duplicate entry '20123-0' for key 'IX_A548BA27' - assuming there is one record already in place without content in "Title" and "Summary" Damascus's auto-generated fields.

The User needs to put something different from other records in those fields to avoid the error: Duplicate entry '20123-position-five' for key 'IX_A548BA27' - assuming there is one record already in place with "position-five" content in "Title" and "Summary" Damascus's auto-generated fields.

@icarrara icarrara changed the title From nested third level of entities Damascus v.1.1.3 fails to create two or more records Damascus v.1.1.3 fails to create two or more records Dec 13, 2019
yasuflatland-lf added a commit that referenced this issue Dec 13, 2019
@icarrara icarrara changed the title Damascus v.1.1.3 fails to create two or more records Damascus v.1.1.4 fails to create two or more records Dec 13, 2019
@icarrara
Copy link
Author

Using damascus.build.number=V1.1.4TS20191213045547.

Steps to reproduce:

  1. Insert a record without to fill the "Title" and "Summary" Damascus's auto-generated fields.

  2. In databse you can see the below:
    immagine

  3. Insert a new record without to fill the "Title" and "Summary" Damascus's auto-generated fields.

  4. You get the error: Duplicate entry '20123-0' for key 'IX_7C719B8F'

  5. Edit and update the first record without to fill the "Title" and "Summary" Damascus's auto-generated fields.

  6. In databse you can see the below:
    immagine
    Damascus's logic copied the ID of the record in the "urlTitle" field so never Duplicate entry .... error happens.

The issue is confirmed when you insert a new record leaving empty the "Title" and "Summary" Damascus's auto-generated fields or putting in it values already presents in the table.

yasuflatland-lf added a commit that referenced this issue Dec 16, 2019
@icarrara
Copy link
Author

Ok, fixed.

Tested with Liferay 7.2.0 and 7.2.1.

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

No branches or pull requests

2 participants