Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: Is there a simpler way to map Hibernate? Date: Fri, 1 Sep 2023 08:27:15 -0400 Organization: A noiseless patient Spider Lines: 16 Message-ID: References: <015e1e01-2e15-49bf-ae5e-07470e4e3d2bn@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 1 Sep 2023 12:27:15 -0000 (UTC) Injection-Info: dont-email.me; posting-host="cb85e14bf167dff1355501843a4c18ca"; logging-data="3971827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/dDM5bKVecIL4cw+IwGS8UVaDd6T42xq4=" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Cancel-Lock: sha1:6xLfuVfAshRT5Gz2Kd30LextCbc= In-Reply-To: Content-Language: en-US Xref: csiph.com comp.lang.java.programmer:40003 On 9/1/2023 7:08 AM, e.d.pro...@gmail.com wrote: >> If you use JPA annotations why do you need a Hibernate mapping >> file at all? >> >> Just use annotations @Id, @Column, @OneToMany on properties >> to specify all the details on how to access database. > I am using those annotations, and if I don't have the mapping tags in > the cfg file, as soon as I call createQuery I get "... is not > mapped" What do you have in persistence.xml? Arne