Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Object Relational Mapping
Search Coderanch
Advance search
Google search
Register / Login
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
Forum:
Object Relational Mapping
Will it provide me Id of record saved ?
Karn Kumar
Ranch Hand
Posts: 153
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi All ,
One doubt i have can you guys please help
I have below structure
ABC abc= new ABC(); abc.setName("MIKETEST"); //It also has Id param SAVETEST(abc); System.out.println("abc ID : "+abc.getId()); //LINE 1
Now i am calling below method
public void SAVETEST(ABC abc) { this.getHibernateTemplate().saveOrUpdate(abc); this.getHibernateTemplate().flush(); }
Can i get Id in LINE 1 ?
Karn Kumar
Ranch Hand
Posts: 153
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
From my observation, It is not returning ID for it.
Jaikiran Pai
Sheriff
Posts: 10445
227
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What does this return?
this.getHibernateTemplate()
and what does the API documentation say about the saveOrUpdate method?
[
My Blog
] [
JavaRanch Journal
]
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Regex - Delimiter question
Struts2 POJO population from URL
XML String sorting issue .
number of strings created in concatenation operation.
Does the function reuse way violate the information hiding?
More...