USB-VirtualAssistant / virtualAssistant

0 stars 0 forks source link

ERROR: syntax error at or near "user" #25

Open CamilaM16 opened 1 year ago

CamilaM16 commented 1 year ago

The Spring Boot logs with error: Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "user" when run VirtualAssistantApplication. This error is caused by "user" being a reserved word in postgresSQL. Steps

  1. Move to dev branch
  2. Run VirtualAssistantApplication main.

Workaround: A workaround is to query using quotes. Example: Select * From "user"; And for this error with springBoot it would be: @Table(name = "\"user\"") Another solution is to change the name of the table

Actual Result Attachement Image1 Expected Result Spring Boot logs without errors.

Attachments: Image1: image

desireeacosta commented 1 year ago

Fixed: https://github.com/USB-VirtualAssistant/virtualAssistant/pull/28

CamilaM16 commented 1 year ago

VA-038 [SP-1] : ERROR: syntax error at or near "user"