• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic casting

 
Raja Selvaraj
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m using more than one table .I have to select the table dynamically while loading data is it possible


Person person= (Person ) session.get(Person .class, Id);

Student student=(Student) session.get(Student.class, Id);

I will get the class name in run time

How can i fetch data for it
 
Raja Selvaraj
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
help me
 
Hemant Thard
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Raju,

Can you be bit more clear. I am not sure what it is that you want to ask.


 
Hemant Thard
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and welcome to javaranch.

Also wanted to point you out that this topic has been marked as resolved(by you..?)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic