Discussions

EJB programming & troubleshooting: how to delete database records in cmp?

  1. how to delete database records in cmp? (3 messages)

    how to delete database records in cmp?

    EJB-QL just able to 'SELECT' OBJECT .Will EJB-QL be update to able to UPDATE or DELETE OBJECT?

    How can I delete or update records in CMP now.

    If I write some SQL in EJBRemove(),Will CMP lose its advantage of Container Managed?

    thank u ~~~~~~~~~~~
  2. to remove the record from the database obtain the record via it's primary key

    and then do <item>.remove();

    to update the row in the database obtain the record again and then use the setter methods to change its details
  3. to remove the record from the database obtain the record via it's primary key

    >
    > and then do <item>.remove();
    >
    > to update the row in the database obtain the record again and then use the setter methods to change its details

    thanks a lot

    you mean we should write some SQL in EJB ?yet ,if we do that ,we lose CMP ! that is Container Managed! Is that right?
    so ,what we can do by adding some EJB-QL in description files???

    thanks again
  4. no dont write any sql in the cmp beans as the container does all the work