Hi, I making an entity bean (CMP) which needs a finder method which uses 2 tables. The jBoss documentation (jBoss 2.0 Manual (preliminary)) states the following: (in Writing EJBs->Entity Beans->CMP Entity Beans->Finders for CMP Entity Beans) "JAWS will automatically create finders for findByPrimaryKey, findAll, and findAttribute where Attribute is a container-managed field. For finders that return multiple results, you can choose in your home interface whether to return Collections (Java 2+) or Enumerations (Java 1+), and JAWS will create them accordinaly. If you want to create additional finders, you have two options. First, you can declare them in your home interface and then create finder definitions in your JAWS deployment descriptor (see The JAWS Deployment Descriptor). This is suitable for queries that only involve the table your entity bean is stored in: effectively, you can write the WHERE clause of a SQL query, but the FROM clause is fixed. Second, you can implement the finders yourself, even if the rest of your bean uses CMP. This is best for complex queries that require other tables. Any time you implement a finder yourself (even for the default finders mentioned above), JAWS will use it rather than ignoring it. But you probably don't want to do that unless you really need to." So naturally I think ok, i'll make my own finder method, but then I read the following in some older mail from the list: >Jerome Veillard wrote: >> Second, you can implement the finders yourself, even if the rest of >> your bean uses CMP. This is best for complex queries that require >> other tables. Any time you implement a finder yourself (even for the >> default finders mentioned above), JAWS will use it rather than >> ignoring it. But you probably don't want to do that unless you really >> need to." > >This is not correct. In which document is this? (Because it should be >removed) > >Sorry for any inconvenience! > >regards, > Rickard > Could someone please make it absolutely clear for me whether I have to make the whole bean BMP now, instead of CMP?? If this is the case (hope not, but think so :-), then the error in the documentation is located exactly here: Writing EJBs->Entity Beans->CMP Entity Beans->Finders for CMP Entity Beans Just in case somebody just gets the urge to document rather than code :-) ^torsten -- -------------------------------------------------------------- To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Problems?: [EMAIL PROTECTED]
