cancel
Showing results for 
Search instead for 
Did you mean: 

Hybris - Error facing while changing column name manually in Database

jamnas_jalaluddin
Discoverer
0 Kudos

I wanted to change the column name of a table from the database directly. After doing this the application is still trying to refer the old column name. Does anyone came across the same issue and has fixed it.

Changes made:

Executed alter script to change the column name in DB

Executed alter script to change the column mapping in attributedescriptor table

Accepted Solutions (0)

Answers (2)

Answers (2)

StefanKruk
Active Participant
0 Kudos

The Hybris is saving the Table in the ComposedType in the field "table" which Table should be used.

Also have a look at the table ydeployments. There the typecode, as well as the tableName is saved. Together with additional Information.

Also note, that Renaming a Table in the Database directly is not recommended as it will lead to unforeseen issues like you experiencing right now. Even if you change the DeploymentTable in the items.xml. Without initializing the whole hybris still the old Database Table will be used.

jamnas_jalaluddin
Discoverer
0 Kudos

One more point to add:

When we try to run a flexible query in the hac for the attribute ‘user’ in the cart tables it is getting translated to the correct column name (P_USER) in the SQL Query tab .

But when this query is executed from the application, hybris internally is still trying to refer the old column name even when we have changed the column name in the DB table and the mapping in the attributedescriptor table.