Article View: pl.comp.lang.java
Article #141869Re: Jak skorzystać z widoków bazy danych w JSF z użyciamiem EntityManager?
From: Brzezi
Date: Thu, 23 Oct 2008 07:41
Date: Thu, 23 Oct 2008 07:41
23 lines
2176 bytes
2176 bytes
czw, 23 paź 2008 o 11:05 GMT, Wito napisał(a):
> mam zrobiony widok v_czytania i encje Vczytania.java
>
> @Entity
> @Table(name = "V_CZYTANIA")
> @NamedQueries({@NamedQuery(name = "VCzytania.poID", query = "SELECT t
> FROM v_czytania t")})
A czy ty przypadkiem nie piszesz SQLa zamias EJBQLa? "FROM v_czytania" to
odwoluje sie do tabelki SQL, nie mozesz tak robic w EJBQL, chyba pomyliles
native queries z named queries...
> viewList.addAll(em.createNamedQuery("VCzytania.poID").getResultList());
em.createQuery("SELECT t FROM Vczytania t").getResultList();
Pozdrawiam
Brzezi
--
[ E-mail: brzezi@enter.net.pl ][ Learn from other people's mistakes, ]
[ Ekg: #3781111 ][ you don't have time to make your own. ]
[ LinuxUser: #249916 ][ ]
Technical Details
Message-ID:
<slrn.pl.gg0fvj.gsc.usunto.brzezi@localhost.localdomain>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!newsfeed.silweb.pl!news.us.edu.pl!news.nask.pl!news.nask.org.pl!newsfeed.atman.pl!not-for-mailReferences:
<9d5ee091-68c9-4c11-84a0-85a4e677159c@m36g2000hse.googlegroups.com> <slrn.pl.gfu1i9.gsc.usunto.brzezi@localhost.localdomain> <3f784cce-41d8-4924-a772-63f3247e78a0@8g2000hse.googlegroups.com> <slrn.pl.gfu8h4.gsc.usunto.brzezi@localhost.localdomain> <02fa4642-bf55-4032-bd80-be7cff3060da@l77g2000hse.googlegroups.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!newsfeed.silweb.pl!news.us.edu.pl!news.nask.pl!news.nask.org.pl!newsfeed.atman.pl!not-for-mail From: Brzezi <usunto.brzezi@enter.net.pl> Newsgroups: pl.comp.lang.java Subject: Re: Jak skorzystać z widoków bazy danych w JSF z użyciamiem EntityManager? Date: Thu, 23 Oct 2008 07:41:04 +0000 (UTC) Organization: Hard Core Slrn-pl User Lines: 23 Message-ID: <slrn.pl.gg0fvj.gsc.usunto.brzezi@localhost.localdomain> References: <9d5ee091-68c9-4c11-84a0-85a4e677159c@m36g2000hse.googlegroups.com> <slrn.pl.gfu1i9.gsc.usunto.brzezi@localhost.localdomain> <3f784cce-41d8-4924-a772-63f3247e78a0@8g2000hse.googlegroups.com> <slrn.pl.gfu8h4.gsc.usunto.brzezi@localhost.localdomain> <02fa4642-bf55-4032-bd80-be7cff3060da@l77g2000hse.googlegroups.com> NNTP-Posting-Host: chello089077080110.chello.pl Mime-Version: 1.0 X-Trace: node1.news.atman.pl 1224747664 19296 89.77.80.110 (23 Oct 2008 07:41:04 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Thu, 23 Oct 2008 07:41:04 +0000 (UTC) X-Licznik: 9254 User-Agent: slrn/0.9.7.4 (pl-1.4.3) (Linux/2.6.24-19-generic (i686)) X-NNTP-Posting-Host: localhost.localdomain Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit