• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

converting database tables into POJO

 
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
may I know how to convert database into Hibernate POJO classes.

I want to know how to design/define 1...m , 1..1, m..m in POJOs of Hibernate.

many thanks in advance,
Rahul.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bit of a vague question this. Are you asking about auto generating java classes or how to define associations?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Hibernate mappings are covered in the Hibernate documentation.
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Sturrock wrote:Bit of a vague question this. Are you asking about auto generating java classes or how to define associations?




i am new to both hibernate and designing software components.

i am using oracle there i see 3 tables like department/ emp and some other table. what if i want to create a web application where the end user can submit the information abuot the employee to the database.

in otherwords, my web application uses hibernate as a middleware for curd operations. may i know how to design that.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you looked at the documentation? This is covered.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rauhl Roy wrote:
in otherwords, my web application uses hibernate as a middleware for curd operations. may i know how to design that.



You want to look at the MVC design pattern.
Model is your hibernate relational mapping
View is the web page for display
Controller is the code to interact with your model and view.

Let us know how you make out.
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Kilcy wrote:

Rauhl Roy wrote:
in otherwords, my web application uses hibernate as a middleware for curd operations. may i know how to design that.



You want to look at the MVC design pattern.
Model is your hibernate relational mapping
View is the web page for display
Controller is the code to interact with your model and view.

Let us know how you make out.



does it mean hibernate is used as a middle layer between database and controller?
 
David Kilcy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rauhl Roy wrote:

David Kilcy wrote:

Rauhl Roy wrote:
in otherwords, my web application uses hibernate as a middleware for curd operations. may i know how to design that.



You want to look at the MVC design pattern.
Model is your hibernate relational mapping
View is the web page for display
Controller is the code to interact with your model and view.

Let us know how you make out.



does it mean hibernate is used as a middle layer between database and controller?



Yes
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic