Results 1 to 4 of 4
  1. #1
    eva
    eva is offline Member
    Join Date
    Dec 2007
    Posts
    49
    Rep Power
    0

    Default PK for Entity beans

    Is it mandatory to set a primary key for Entity beans? I believe that in CMP, we can simply ignore primary key but for BMP, we should declare primary key. Please correct me.

    - PEACE

  2. #2
    simi's Avatar
    simi is offline Member
    Join Date
    Dec 2007
    Location
    Singapore
    Posts
    18
    Rep Power
    0

    Default

    Hi,

    Please read following online explanation. If you still have doubt post it hear , we will try our best to explain.

    Regards,
    Simi

  3. #3
    roots's Avatar
    roots is offline Moderator
    Join Date
    Jan 2008
    Location
    Dallas
    Posts
    293
    Rep Power
    7

    Default

    PK is mandatory for both CMP or BMP. findByPrimaryKey() .. it's been long but having a local copy of EJB copy really helped me doing EJB.

    The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 220
    dont worry newbie, we got you covered.

  4. #4
    linuxswan is offline Member
    Join Date
    Mar 2008
    Posts
    28
    Rep Power
    0

    Default

    Primary Keys for Bean-Managed Persistence

    this will give the clarification for you

    Hey no need, i will give the program which will give you full idea about this

    i.e not possible for us to search the data based on the primary key only in the database in general, so there is a need to understand the entitybeans without the primary key field. soon i will give the program here
    Last edited by linuxswan; 07-21-2008 at 02:32 PM.

Similar Threads

  1. Entity Beans in JBOSS
    By dcpmt in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 11-29-2007, 02:49 PM
  2. problem with ejb 3.0 entity beans with manyToMany relationship
    By makcro in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 07-26-2007, 07:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •