Recently I am back to J2EE , and starting to create my entity from database of course with the facade (Session Bean from entity classes), btw am currently using NetBeans IDE 7.2 . When I try to use the facade to find the entity, I get “Internal Exception: org.postgresql.util.PSQLException: ERROR: relation “table_name” does not exist“, then I try to searching trough search engine and still find no solution. My colleague try to recreate the entity with clone project he have in his PC and the problem is solved, but I did not satisfied, then try to looking at his recreate entity and mine and found some differences.
My entity at Table annotation :
@Table(name = "table_name")
His recreate entity at Table annotation :
@Table(name = "table_name", catalog = "database_name", schema = "schema_name")
His recreate entity has more detail (database name and schema name), so I try to use it too and problem resolved. When I write this, I still don’t know what make it this some differences happen, maybe our IDE, but for you who also have the same problem, try to use this solution.
Subscribe & fast response : Follow @etayuy