Hibernate 면접 질문과 답변
Question: How do you map Java Objects with Database tables?Answer: * First we need to write Java domain objects (beans with setter and getter). The variables should be same as database columns.* Write hbm.xml, where we map java class to table and database columns to Java class variables. Example : <hibernate-mapping> <class name="com.test.User" table="user"> <property column="USER_NAME" length="255″ name="userName"; not-null="true" type="java.lang.String"/> <property column="USER_PASSWORD" length="255″ name="userPassword" not-null="true" type="java.lang.String"/> </class> </hibernate-mapping> |
복습용 저장
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
도움이 되었나요? 예 아니요
Most helpful rated by users:
- What is Hibernate?
- What is ORM?
- What does an ORM solution comprises of?
- What are the different levels of ORM quality?
- What the Core interfaces are of hibernate framework?