users@glassfish.java.net

Re: Working with JPA and Database Views

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Tue, 15 Sep 2009 13:20:13 -0700

I'm not sure @NamedQueries make any difference...

Do you want to prevent somebody else from creating or removing your entities?
Would adding PrePersist and PreRemove callbacks solve the problem?

thanks,
-marina

glassfish_at_javadesktop.org wrote:
> So the best way is to map my Database Views with classes annotated with @Entity + @NamedQueries.
>
> Is there any way to tell to the persistence provider to don't try to create or drop the entities that I use to map my database views ?
> [Message sent by forum member 'arissonleal' (arissonleal_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=364044
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>