0 Replies Latest reply on Sep 8, 2005 6:45 AM by Marc Ende

    CMP with composite pk

    Marc Ende Newbie

      Hi there,

      I've got a strange problem with the CMPs, especially with composite primary keys.

      There is a table with 3 indices and 4 further fields (the database is Oracle 10g Rel. 2). I've generated the Bean with middlegen and xdoclet.

      When I use it to create a entity with the .create(pk) there is no problem.
      But when I try to read from the database (findByPrimaryKey(pk)) I got an FinderException "No such entity!".

      But that's not the truth. I've created AND searched for the entity with the same pk. I've also tried to read from the database exisiting entities but no luck.
      Setting the LogLevel for the cmp plugin to TRACE tells me that everything is send to the database correctly. To check the sql-queries from jboss to the database I've used the p6sql. p6sql showed me the correct sql-query wich I could execute on sqlplus without any problems.

      Configuration: jboss 4.0.2, oracle 10g R2, classes12.jar, ojdbc14.jar (both tried)

      Yours

      marc