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

Impossible to validate two columns with the same relation entity #97

Open
icarrara opened this issue Dec 19, 2019 · 0 comments
Open

Impossible to validate two columns with the same relation entity #97

icarrara opened this issue Dec 19, 2019 · 0 comments
Labels

Comments

@icarrara
Copy link

Using damascus.build.number=V1.1.5TS20191216114343 - Steps to reproduce:

  1. In a entity create two columns of type com.liferay.damascus.cli.json.fields.Long:
  • arrivalday
  • departureday

{ "type": "com.liferay.damascus.cli.json.fields.Long", "name": "arrivalday", "title": "Arrival Day", "showFieldInView": "false", "required": "true", "validation": { "className": "DayName", "fieldName": "daynameId", "orderByField": "description" } }, { "type": "com.liferay.damascus.cli.json.fields.Long", "name": "departureday", "title": "Departure Day", "showFieldInView": "false", "required": "true", "validation": { "className": "DayName", "fieldName": "daynameId", "orderByField": "description" } }

  1. Validate the two columns to the same associated model:
  • className: DayName

{ "model": "DayName", "title": "Day Name", "web": "true", "asset": { "assetTitleFieldName": "DayNameTitleName", "assetSummaryFieldName": "DayNameSummaryName", "categories": "false", "discussion": "false", "ratings": "false", "tags": "false", "relatedAssets": "true", "fullContentFieldName": "DayNameFullContent", "workflow": "true", "generateActivity": "true", "trash": "true", "advancedSearch": "true", "exportExcel": "true" }, "fieldsName": "DayNames", "fields": [{ "type": "com.liferay.damascus.cli.json.fields.Long", "primary": true, "name": "daynameId", "title": "Day Name Id", "showFieldInView": "false", "required": "true" }, { "type": "com.liferay.damascus.cli.json.fields.Varchar", "name": "description", "title": "Description", "length": "255", "showFieldInView": "true", "required": "true" }, { "type": "com.liferay.damascus.cli.json.fields.Integer", "name": "daynumber", "title": "Numero Giorno", "showFieldInView": "true", "required": "true" } ], "customValue": { "your_own_id": "your_custom_value_for_template_here" } }

  1. Do a "damascus create" and then "blade deploy".

  2. The Java code is in error because the duplicate "DayName" name causes issues in the -web module.

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