Is it Mandatory to map each pojo class variable with table
column in Hibernate? Is there any alternative to skip some
of those? Thanks in advance...

Answers were Sorted based on User's Feedback



Is it Mandatory to map each pojo class variable with table column in Hibernate? Is there any altern..

Answer / simhanijagadeesh

good question...good question...we need all colunns
properties map in pojo.hbm.xml and pojo when and only we
need to create with that table creation.if you are doing
fetching data no need of all variables in pojo and hbm
file.good Question by you.....keep it up...I tested and
found in my real project...I will give you clear info on
this after verifying my project.

Is This Answer Correct ?    0 Yes 0 No

Is it Mandatory to map each pojo class variable with table column in Hibernate? Is there any altern..

Answer / shashi

No,its not mandatory to map each variable in class with table column in hibernate.

you can skip some of the those using trasient keyword from persisting into database

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Java J2EE AllOther Interview Questions

What is java collection? : java collections

0 Answers  


What is the enumerator of the java collection framework? : java collections

0 Answers  


Hi frnds how to lock an user when he enter wrong credentials more than 3 time using java or j2ee tech take username and password in a bean no need to connect DB and validate give me some sample application code or links its urgent for me thanks in advance

0 Answers   NSN,


what is difference between struts1.2 and struts2.0

1 Answers  


What is the servletcontext listener and what is JspContext and page context pls tell in simple words.

1 Answers   IBM,


What are the types of interface used in the java collections? : java collections

0 Answers  


what are callback methods?

3 Answers   iFlex,


What do you understand by synchronization? Why is it important?

0 Answers  


How to call the m1() method of Base class in below snippet ? class Base { public void m1() { System.out.println("Base m1 "); } public void m2() { System.out.println("Base m1 "); } } ====================== class Derived extends Base { public void m1() { System.out.println("Derived m1"); } public void m3() { System.out.println("Derived m3"); } public static void main(String[] args) { Base ob=new Derived(); ob.m1(); //System.out.println("Hello World!"+ob.m1()); } }

6 Answers   Cap Gemini, TCS,


what is filter ?

2 Answers   SolutionNET,


Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword

0 Answers   TCS,


which book is the best for preparing for SCWCD 1.5

4 Answers   Google,


Categories