cancel
Showing results for 
Search instead for 
Did you mean: 

DatabaseModelGenerator - Database Column name for AbstractOrderEntries

Former Member
0 Kudos
1,574

Hi there!

For evaluating I tried to "cherry-pick" the Quotes introduced with Hybris 6.3 on an existing 5.7 installation.

On URS I got this exception:

 INFO   | jvm 1    | main    | 2017/02/01 16:34:24.448 | ERROR [hybrisHTTP3] [DefaultInitUpdateFacade] Failed to initialize INFO   | jvm 1    | main  | 2017/02/01 16:34:24.448 | java.lang.IllegalStateException: Table does not have column OrderPK INFO   | jvm 1    | main    | 2017/02/01 16:34:24.448 |     at de.hybris.bootstrap.ddl.DatabaseModelGenerator.getColumn(DatabaseModelGenerator.java:782)

This happens if I add the quoteentry definition to my items.xml:

 <collectiontype code="QuoteEntryCollection" elementtype="QuoteEntry" type="list"/>
 
 <itemtype code="QuoteEntry"
               extends="AbstractOrderEntry"
               jaloclass="de.hybris.platform.jalo.order.QuoteEntry"
               autocreate="true"
               generate="true">
         <deployment table="QuoteEntries" typecode="61" />
         <attributes>
             <attribute autocreate="true" redeclare="true" qualifier="order" type="Quote">
                 <modifiers read="true" write="false" search="true" removable="true" optional="false" initial="true"
                            unique="true"/>
             </attribute>
         </attributes>
 </itemtype>

Now I'm wondering why both existing types CartEntry and OrderEntry use a DB column "orderPK" whereas the cherry-picked QuoteEntry uses "p_order".

Where is this mapping qualifier -> column name done? Anyone knows? Thanks!

View Entire Topic
fotios_rafailidis
Discoverer
0 Kudos

The problem is caused because of the inconsistency of the column names between the different hybris versions. This happens because the quoteentries database table should be created. By executing the above sql script from

  • these column would be renamed as hybris expects in version 6.3 and

  • update the corresponding attribute descriptors

The URS at the end is executed successfully.

eduardasm
Explorer
0 Kudos

We were facing the same problem, the suggested script has done the trick. Thank you!

0 Kudos

We upgraded from 5.7 to 6.4 an this solved the issue, thanks to for your great answer!

Former Member
0 Kudos

after updating above script still facing same issue.java.lang.IllegalStateException: Table does not have column OrderPK

Former Member
0 Kudos

Hybris 6.2 to hybris6.3 migration :System update fails with error - Table does not have column OrderPK .