tag « Map « JPA Q&A





1. Problem with mapping tag in hibernate configuration file    stackoverflow.com

I am using hibernate annotations and when I do following everything works fine

sessionFactory = new AnnotationConfiguration()
                ...

2. force hyperjaxb2 to generate a fetch="select" propertie on hibernate mapping (on tag)    stackoverflow.com

We have found a problem on our application (a select query that join too much tables). The solution of this problem is to set fetch="select" on the <join> tag in our ...

3. how to work with sql-query tag in hibernate mapping file    stackoverflow.com

i am very new to Hibernate, i have requirement that i want configure a sql server join query and call that query using getNamedQuery method from java code. i have two diffarent ...

4. Can entity-name used instead of class with in the tag mapping xml?    stackoverflow.com

I would like to ask if it's possible to use the any mapping with entity-name instead of class as in the other mappings (like one-to-many, e.g.). I have - ...

9. Use of set tag in Hibernate mapping file for foreign key    coderanch.com

Hi All, I have 2 tables Person and Employee. In Person table person's name is primary key. In Employee table, there is a composite key, which consists of person's name(foreign key) and employee id. Mapping file for above scenarios are: for class person: for employee class: ...





10. Question on the version tag in the XML mapping files...    forum.hibernate.org

The addition of a version tag seems to have caused some errors in my Hibernate mappings (Hibernate v2.0.3). Is this correct? Any help would be appreciated. I am currently getting the error below: 15:20:08,255 ERROR XMLHelper:37 - Error parsing XML: XML InputStream(97) org.xml.sax.SAXParseException: The content of element type "version" must match "EMPTY". at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213) at org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1851) ...

11. via set tag parent is saved but unable to save childs    forum.hibernate.org

hi, I am using hibernate 2.1 and sybase.this is my scenario MovieLibrary ============= ProgramID int clientID int composite key is (clientID,ProgramID) mapping snippet for MovieLibrary is --- Movie ======== episodeID int effectiveStartDate ...

12. saving properties mapped with using formula tag    forum.hibernate.org

hi all, suppose I have Table A: id, name, bID (class A: id, name, bName) Table B: bID,name,work, address,..... ( no B class)

13. Can I create a hibernate-mapping file w/o an id tag?    forum.hibernate.org

I don;t want to use an id. My primary key will be that tracking number. How do I avoid this error? Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,(cache|jcs-cache)?,(id|composite-id),discriminator?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|any|map|set|list|bag|idbag|array|primitive-array)*,(subclass*|joined-subclass*))".

14. Avoiding overriding inherited meta tags    forum.hibernate.org

According to the docs, if you add a tag to a , that declaration will replace/override any inherited "implements" tags. Is there any way to have an "additive" behavior instead of an "override" behavior, so that I get the locally declared implements in addition to the inherited ones? I'm using hibernate2.1.6, but it would be interesting to me if ...

15. Correct usage of mapping "cascade" tags    forum.hibernate.org

Hi, I have been having some dificulties on how to configure and use the cascade tags when mapping one-to-many relationships. In the case I am working on right now, I have one entity called LoteFinanceiro which has 2 one-to-many relationships, one with Cheque and another one with Dinheiro. You will be able to see the code in the mappings below. I ...

16.  mapping with tag    forum.hibernate.org

Newbie Joined: Wed Apr 20, 2005 4:47 am Posts: 1 Location: Johannesburg, South Africa Is it possible to create an array with polymorphic elements within hibernate, using a tag inside an mapping? In other words, is it possible to persist an entity that includes a field that looks as follows: private Object[] objectArray; I am using the basic org.hibernate.auction ...





18. Problem with hibernate-mapping tag    forum.hibernate.org

Hi, I am getting the following syntax error, while parsing the xml mapping file with hibernate 3.2 Code: The content of element type "hibernate-mapping" must match "(meta*,typedef*,import*,(class|subclass|joined-subclass|union-subclass)*,resultset*,(query|sql-query)*,filter-def*,database-object*)" I can not find out what is missing or what is wrong with my mapping. Code:

19. Empty id tag in mapping generates a parse error    forum.hibernate.org

...