Get the table name from the model in Hibernate

前端 未结 8 1872
名媛妹妹
名媛妹妹 2020-12-05 04:33

How do I get the table name for a model in Hibernate?

Apparently there used to be a getTableName() method in ClassMetadata, but it\'s been removed.

8条回答
  •  温柔的废话
    2020-12-05 04:41

    Using the Configuration, you can call the GetClassMapping() method for a specific type, which would give you some mapping information for that type.

    (At least, this is the case in NHibernate, but I suppose that this will be similar in Hibernate).

提交回复
热议问题