domain class « Map « JPA Q&A





1. Mapping result of a native SQL query to Grails domain class    stackoverflow.com

Is it possible to map the result of a native SQL query to a collection of Grails domain class instances?

2. hibernate mapping file for a grails domain class conundrum    stackoverflow.com

I have a legacy database table to map to with a grails app I have to use a hibernate mapping file for a grails domain class in order to get some decimal ...

3. How to mapping primary key is VARCHAR2 type and excute my method to generate it    stackoverflow.com

I'm grails newbie.i want to mapping primary key with VARCHAR2 and generate primary key using my method to generated its.how to solve this problem?

4. Changing the discriminate-column in a single table sub class with JPA inheritance    stackoverflow.com

I have a domain model that looks like this:

     Instruction
       |      \
     ...

5. Grails & JPA annotations + hibernate mapping files. How to get rid of this error?    stackoverflow.com

I'm trying to reuse some of the entity classes with JPA-annotations in my project. But unfortunately I'm newbie in Hibernate & JPA too. When I try to generate controllers with command ...

6. Problem mapping Grails Domain class to legacy database with TEXT field    stackoverflow.com

I am trying to build a set of domain classes for a legacy database using Grails 1.3.7 and MySQL 5.1.56. I am specifying the MySQL connector in the BuildConfig.groovy file as ...

7. property in domain class not mapped to a table    stackoverflow.com

I want to add a property to a domain class in order to calculate something using the properties of the class:

 @Entity
 @Table(name="tablename")

 public class MyDomainClass {

    int ...

8. Mapping enums that are defined in a domain class    forum.hibernate.org

I have a bunch of status type enums that I need persisted, and a domain class that it is related to, such as: Task TaskStatus (defined as an enum within the Task class) I've been using this in my hbm file: Code: ...

9. Does possible mapping class + enum's + domain table?    forum.hibernate.org

Hi all, I'm trying write a mapping file to my schema but I not kwnow as... see: ############### class definitions ############# public enum MediaPosition { Master, Slave } public enum MediaType { Hard, CD, DVD } public class Media { //... public int ID { ... } public string Label { ... } public MediaType Type { ... } public MediaPosition ...





10. Mapping SQL query to domain class    forum.hibernate.org

Hi. I want to map one table to many domain object. I think this is could be possible using SQL query. It's possible to do this in hibernate ? I know this feature is possible in Ibatis. But I searched in documents but I didn't find anything about it. Regards in advanced. Manuel Loayza SCBCD, SCWCD