Attachment SQL: Difference between revisions

From IMSMA Wiki
Jump to navigation Jump to search
Created page with "Sorry, we have decided to only have SELECT SQLs at these pages so this you have to check with Navicat and update the name if necessary in Table design manually. I created thi..."
 
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Sorry, we have decided to only have SELECT SQLs at these pages so this you have to check with Navicat and update the name if necessary in Table design manually.
{{Warning| This page contains table '''design''' change syntax}}


I created this page so all points on the checklist has a SQL page so this point is not missed.
Check the table design with Navicat and if necessary update the name of the column to leading capital F:
* manually in Table design '''OR'''
* run this query
<pre>
ALTER TABLE attachment RENAME COLUMN "filedescription" TO "Filedescription";
</pre>
[[Image:Attachment error.png|500px]]<br/>
If the column name is not correct this error message below will be triggered when the user opens any Summary window:


If the column name is not correct this error message below will be trigged when the user opens any Summary window:
<code>com.fgm.imsma.model.exception.ModelException: org.hibernate.PropertyAccessException: Exception occurred inside setter of com.fgm.imsma.pojo.Fieldreport.attachments
com.fgm.imsma.model.exception.ModelException: org.hibernate.PropertyAccessException: Exception occurred inside setter of com.fgm.imsma.pojo.Fieldreport.attachments


at java.awt.EventDispatchThread.run(Unknown Source) Caused by: org.hibernate.PropertyAccessException: Exception occurred inside setter of com.fgm.imsma.pojo.Fieldreport.attachments
at java.awt.EventDispatchThread.run(Unknown Source) Caused by: org.hibernate.PropertyAccessException: Exception occurred inside setter of com.fgm.imsma.pojo.Fieldreport.attachments
Line 12: Line 18:
Caused by: org.postgresql.util.PSQLException: ERROR: '''column attachment0_.Filedescription does not exist'''
Caused by: org.postgresql.util.PSQLException: ERROR: '''column attachment0_.Filedescription does not exist'''


(short version of error message)
</code>
 
 
{{note | Short version of error message}}
 
{{NavBox Upgrade}}
[[Category:SQL Queries]]
[[Category:SQL Queries]]


[[Category:NoPublic]]
[[Category:NoPublic]]
[[Category:NAA]]
[[Category:NAA]]

Latest revision as of 10:23, 12 July 2014

This page contains table design change syntax

Check the table design with Navicat and if necessary update the name of the column to leading capital F:

  • manually in Table design OR
  • run this query
ALTER TABLE attachment RENAME COLUMN "filedescription" TO "Filedescription";


If the column name is not correct this error message below will be triggered when the user opens any Summary window:

com.fgm.imsma.model.exception.ModelException: org.hibernate.PropertyAccessException: Exception occurred inside setter of com.fgm.imsma.pojo.Fieldreport.attachments

at java.awt.EventDispatchThread.run(Unknown Source) Caused by: org.hibernate.PropertyAccessException: Exception occurred inside setter of com.fgm.imsma.pojo.Fieldreport.attachments

Caused by: org.hibernate.exception.SQLGrammarException: could not initialize a collection: [com.fgm.imsma.pojo.Fieldreport.attachments#0aac-90b2-132a55d88aa-33985c11-8c-e68]

Caused by: org.postgresql.util.PSQLException: ERROR: column attachment0_.Filedescription does not exist

Short version of error message

{{#switch:|subgroup|child=|none=|#default=

}}{{#if:|}}{{#if:Upgrade Process|<td style="text-align:left;border-left-width:2px;border-left-style:solid;|{{#if:|}}}}{{#if:|{{#if:IMSMA Hub{{#switch:{{#if:|{{{border}}}|child}}|subgroup|child=|none=|#default=

}}{{#ifeq:|Template|{{#ifeq:{{#if:|{{{border}}}|child}}|child||{{#ifeq:{{#if:|{{{border}}}|child}}|subgroup||{{#switch:attachment sql

|doc
|sandbox
|testcases =
|#default = {{#switch:
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}|}}{{#if:|{{{group2}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list2}}}

}}{{#if:|{{#if:IMSMA Hub{{#switch:{{#if:|{{{border}}}|child}}|subgroup|child=|none=|#default=

}}{{#ifeq:|Template|{{#ifeq:{{#if:|{{{border}}}|child}}|child||{{#ifeq:{{#if:|{{{border}}}|child}}|subgroup||{{#switch:attachment sql

|doc
|sandbox
|testcases =
|#default = {{#switch:
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}|}}{{#if:|{{{group3}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list3}}}

}}{{#if:|{{#if:|{{{group4}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list4}}}

}}{{#if:|{{#if:|{{{group5}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list5}}}

}}{{#if:|{{#if:|{{{group6}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list6}}}

}}{{#if:|{{#if:|{{{group7}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list7}}}

}}{{#if:|{{#if:|{{{group8}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list8}}}

}}{{#if:|{{#if:|{{{group9}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list9}}}

}}{{#if:|{{#if:|{{{group10}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list10}}}

}}{{#if:|{{#if:|{{{group11}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list11}}}

}}{{#if:|{{#if:|{{{group12}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list12}}}

}}{{#if:|{{#if:|{{{group13}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list13}}}

}}{{#if:|{{#if:|{{{group14}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list14}}}

}}{{#if:|{{#if:|{{{group15}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list15}}}

}}{{#if:|{{#if:|{{{group16}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list16}}}

}}{{#if:|{{#if:|{{{group17}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list17}}}

}}{{#if:|{{#if:|{{{group18}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list18}}}

}}{{#if:|{{#if:|{{{group19}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list19}}}

}}{{#if:|{{#if:|{{{group20}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list20}}}

}}{{#if:|{{#if:IMSMA Hub{{#switch:{{#if:|{{{border}}}|child}}|subgroup|child=|none=|#default=

}}{{#ifeq:|Template|{{#ifeq:{{#if:|{{{border}}}|child}}|child||{{#ifeq:{{#if:|{{{border}}}|child}}|subgroup||{{#switch:attachment sql

|doc
|sandbox
|testcases =
|#default = {{#switch:
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}|}}

{{{below}}}

}}{{#switch:|subgroup|child=

|none=|#default=}}{{#ifeq:|Template|{{#ifeq:|child||{{#ifeq:|subgroup||{{#switch:attachment sql
|doc
|sandbox
|testcases =
|#default = {{#switch:hlist
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}