• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

findby method returning multiple records..

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What happens when u do
RemoteType findByMethod1(String email) in Finder class....
and finds that there are 2 records in db with same email??
Where can I find EJB specs 1.1 and 2.0 link plz?

 
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We return a Collection, usually an ArrayList. Something like this in the home:

and then in the ejb-jar.xml:

The specs can be found at: http://java.sun.com/products/ejb/?frontpage-javaplatform

Hmmm, didn't like the xml posted here. If you need it, I can e-mail it to you.
[This message has been edited by Michael Hildner (edited March 27, 2001).]
 
suresh Krishnan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think u have mistaken my question...
2 records in database
id email
1 ted@mail.com
2 ted@mail.com
RemoteInterfaceType findByEmail(String emailid) throws FinderException blah balh...
what happens when i call above method...against above database
I knwo we can use collection or enumeration...
but what happens 4 above case?
 
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The signature that you have given here is method declaration for home interface. The return depends on what return type (whether primary key class or Enumeration) you have given in the bean defininition and the logic you have provided in case of Bean managed persistence.
HTH
 
I was born with webbed fish toes. This tiny ad is my only friend:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic