Mixing JPA annotations and XML configuration

Posted by HDave on Stack Overflow See other posts from Stack Overflow or by HDave
Published on 2010-05-15T04:12:12Z Indexed on 2010/05/15 4:24 UTC
Read the original article Hit count: 222

Filed under:
|
|
|
|

I have a fairly large (new) project in which we have annotated many domain classes with JPA mappings. Now it is time to implement many named queries -- some entities may have as many as 15-20 named queries. I am thinking that writing these named queries in annotations will clutter the source files and therefore am considering putting these in XML mapping files.

Is this possible?

Mort importantly, is this reasonable?

Are there better approaches?

How is this done?

© Stack Overflow or respective owner

Related posts about jpa

Related posts about named

  • How to allow bind in app armor?

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    Question: I did setup bind9 as described here: http://ubuntuforums.org/showthread.php?p=12149576#post12149576 Now I have a little problem with apparmor: If I switch it off, it works. If apparmor runs, it doesn't work, and I get the following dmesg output: [ 23.809767] type=1400 audit(1344097913… >>> More

  • MAMP + Python MySQLDB - trouble installing

    as seen on Server Fault - Search for 'Server Fault'
    I'm currently running the latest version of MAMP on my Snow Leopard OSX, and I'm trying to install MySQLDB. Downloaded: MySQL-python-1.2.3c1 I went into the setup_posix.py and adjusted the location of the mysql_config to the one in MAMP: mysql_config.path = "/Applications/MAMP/Library/bin/mysql_config" When… >>> More

  • Building Awesome WM

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. After running cd awesome-3.4 && make I get the following missing dependencies error: Running… >>> More

  • Building Awesome WM

    as seen on Server Fault - Search for 'Server Fault'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. EDIT I ran: sudo apt-get install libxcb-xtest0-dev libxcb-property1-dev libxdg-basedir-dev libstartup-notification0-dev… >>> More

  • Building Awesome WM

    as seen on Super User - Search for 'Super User'
    Hello, I am following these steps in order to build Awesome window manager on 10.04 I am building 3.4 while the tutorial is for 3.1 I installed all of the specified dependencies including cairo. EDIT I ran: sudo apt-get install libxcb-xtest0-dev libxcb-property1-dev libxdg-basedir-dev libstartup-notification0-dev… >>> More