Hi Ranchers,
I was developing an application using
EJB 3 and netbeans 6.1. I am using MySQL.
Now, as netbeans allows us to create entity beans directly by inspecting a database, i tried to use that feature.
My database contains a table that does not have a primary key. Netbeans does not let me add that table through the interactive tool.
Then i tried by creating my entity class manually. But then again it asks me to compulsorily add a primary key.
The problem is that my the table which i need to map as an entity is a join table that contains the primary keys of three separate tables as foreign keys and also some additional data. So, i need to access that table as an entity.
My question is that is it not allowed to create an entity without a primary key? Or is it just netbeans thats creating unwanted problems and doubts in my mind.(no offense intended).
Kindly suggest where i am going wrong or how i might rectify it.
Thanks in advance.