问题
in java class i have seen
@Table(name="user" , catalog="users"
for what purpose it is used
回答1:
From Wikipedia:
The database catalog of a database instance consists of metadata in which definitions of database objects such as base tables, views (virtual tables), synonyms, value ranges, indexes, users, and user groups are stored.
Also, if your DB is MySQL, check this.
Hope that helps.
回答2:
Databases have different methods (or names for the same methods :) to organize its tables.
Some database place all tables in a different "schema", some in different "catalogs". In the attribute you can specify this.
回答3:
That's from the JPA @Table annotation.
来源:https://stackoverflow.com/questions/5246949/what-is-catalog-used-in-hibernate-annotated-class