Using BMP this is definitely possible. All you would have is a finder method
which looks something like this:
public String ejbFindByFirstName(Person p) {
PreparedStatement pstmt = myDBConnection.prepareStatement("select emp_id
from employee where firstname = ?");
pstmt.setString(1, p.getFirstName());
ResultSet res = pstmt.executeQuery();
// parse the results
return strEmpId;
}
Not sure how this would work under CMP.
Hope it helps,
Ijonas.
----- Original Message -----
From: "Nordahl, David C" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 4:27 PM
Subject: [JBoss-user] Finder method question
> I'm wondering if it is possible to create a finder method for an attribute
> which is nested in another object attribute of my bean. For example, say
I
> have an Employee bean with an attribute of type Person (non bean) which
has
> an attribute of last and first name, and I want to make a method
> findByFirstName. Is this possible? And if so how is it done?
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user