Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Entity bean primary key  RSS feed

 
Ashish Sarin
author
Ranch Hand
Posts: 451
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to get the primary key of an entity bean which has not yet been saved in the database i.e., before the transaction has been committed ? For example, I can call create method on the home interface and then call the getPrimaryKey method on the Component interface that's returned from the invocation of create method call.

thanks
Ashish
 
P Das
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Do you need the answer absolutely? I thought now on we will be talkin' abt entities only, since there will be no separate SCEA 5 forum.

Thanks,
 
Ashish Sarin
author
Ranch Hand
Posts: 451
15
 
Bert Bates
author
Sheriff
Posts: 8945
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Ashish,

Does your question have to do with the SCEA exam?
 
Ashish Sarin
author
Ranch Hand
Posts: 451
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. I had a scenario where I needed to know whether this is supported or not. I got the answer after a bit of searching that this is supported. It would have impacted my sequence diagram so I thought I will just clarify this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!