Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The error "Invalid column name" in java.sql.SQLException indicates that the requested column name does not exist in the table being accessed. This error can occur in Hibernate's one-to-one mapping when the mapping configuration does not match the actual database schema.

For example, if the mapping specifies a column name that does not exist in the database table, or if the column name in the mapping does not match the actual column name in the database, this error can occur.

It can also occur if the mapping specifies a foreign key constraint that does not exist in the database schema, or if the foreign key column name in the mapping does not match the actual foreign key column name in the database.

To fix this error, double-check the mapping configuration to ensure that it matches the actual schema of the database, and ensure that the column names and foreign key constraints are correct.