Re: Tables without primarys key?

Stanislav Baiduzhyi <[email protected]>
Newsgroups gmane.comp.java.netbeans.devel
Message-ID <CAFHiie7MnnutdJ-6GeRjn-arwfk-8xZVdce+OPvmkngNGo+yBQ@mail.gmail.com>
On Wed, Dec 9, 2015 at 3:12 PM, janpla <[email protected]> wrote:
> Seeing how I can write an entity class from scratch, which will work perfectly well with JPA, I can't see why it isn't possible to simply have NetBeans generate the same, whether there is a primary key or not. So, is there a good reason?

Well it will not. JPA needs some identity for the entity, something
that you will give to entityManager.find(Class, PK) method. Doing
entity without PK is a corner case that everyone solves differently,
adding better support for such corner-case may result in dirtier APIs
and huge time investment for developers, which can be used better.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.