extend 1 « Map « JPA Q&A





1. How can I extend Java code generated by JAXB, CXF or Hibernate tools?    stackoverflow.com

With generated Java source code, like

  • code generated with Hibernate tools
  • code generated with JAXB schema binding (xjc)
  • code generated with WDSL2Java (cxf)
all generated classes are "value object" types, without business logic. And if ...

2. Extending JPA entity mapping    stackoverflow.com

I'm looking for an easy way to extend existing JPA mapping. The idea is as follows: I have an EAR project with EJB3+JPA module which has ClassA annotated and mapped to table ...

3. Extending JPA entity data at runtime    stackoverflow.com

I need to allow client users to extend the data contained by a JPA entity at runtime. In other words I need to add a virtual column to the entity table ...

4. Hibernate: Used mappedBy on class that extends another class annotated as JoinedSubclass?    stackoverflow.com

The following doesn't work:

@Entity
class Owner {

  @OneToMany(mappedBy="owner", cascade = {CascadeType.ALL})
  protected Set<B> getBSet() {
    ..
  }

}

@Entity
@Inheritance(strategy=InheritanceType.JOINED)
class A {
   @ManyToOne
   public Owner ...

5. Persisting non-entity class that extends an entity (jpa) - example?    stackoverflow.com

The JPA tutorial states that one can have a non-entity that extends entity class:

Entities may extend both entity and non-entity classes, and non-entity classes may extend entity ...

6. Extending an entity    stackoverflow.com

I have class named AbstractEntity, which is annotated with @MappedSuperclass. Then I have a class named User (@Entity) which extends AbstractEntity. Both of these exist in a package named foo.bar.framework. When ...

7. Hibernate Transient Extends problem    stackoverflow.com

@MappedSuperclass
public abstract class BaseAbstract implements Serializable{

 private static final long serialVersionUID = 1L;

 protected String test = //some random value;

 public String getTest() {
  return test;
 }

 public void setTest(String ...

8. Hibernate Polymorphism (Extending Parent Class)    stackoverflow.com

Question regarding Hibernate Polymorphism and extending a parent class (which I can not modify directly). My parent class is called Contact:

@Entity 
@Table(name="contact")
@Inheritance(strategy=InheritanceType.JOINED) 
public class Contact {
  @Id @GeneratedValue(strategy=GenerationType.IDENTITY)
  public ...

9. JPA: how can I extend classes and change the table mapping?    stackoverflow.com

I have created a basic set of classes with methods for doing accounting. My Ledger class allows you to maintain a basic ledger which allows you to obtain the current balance, and ...





10. Extended persistence context type with JPA 2 & Hibernate    stackoverflow.com

I understand that an extended persistence context lasts the duration of the conversation or until the persistence context is closed by the container when the @Remove method of the stateful session ...

11. Extending hibernate entities with annotation    stackoverflow.com

i need to extend an entity, with the same characteristics without using abstract classes. can i code something like below?

@Entity
@Table(name="ABC")
@SequenceGenerator(sequenceName="SEQ_ABC",name="idGenerator",allocationSize=1)
public class Abc {
.. // define members
}

@Entity
@Table(name="EX_ABC")
public class ExAbc extends Abs {
.. // ...

12. OpenJPA - Extending PersistenceMappingDefaults to convert Hungarian to underscores    stackoverflow.com

public class ImprovedMappingDefaults extends PersistenceMappingDefaults {
@Override
protected void correctName(Table table, Column col) {
      String name = col.getName();
      name = addUnderscores(name);
   ...

13. Java EE, casting Entity to Extended one!    stackoverflow.com

Goodmorning. I have two entitis, User and User1 (which extends User with @Inheritance(strategy=InheritanceType.JOINED), adding some extra information like email, phonenumber and so on... attributes not required for the entity User). Now... User user ...

14. How do I extend a hibernate annotated class to point a field to a different hibernate entity?    stackoverflow.com

Let's say I have the following class structure:

/** Boring bits snipped */
@Entity
@Table(name = "Foo")
public class Foo {
    @JoinColumn(name = "id")
    private Bar bar;
   ...

15. JPA: Extending the persistence context vs. detaching entities    stackoverflow.com

There appear to be two patterns to implement business transactions that span several http requests with JPA:

  1. entity-manager-per-request with detached entities
  2. extended persistence context
What are the respective advantages of these patterns? When ...

16. Creating a generic base entity which can be extended for each client    stackoverflow.com

I'm using Eclipselink and I'm trying figure out the best way to create a base class for my entity. For example, I have a User entity and I would like to provide ...





17. What is Hibernate's "extended instrumentation"?    stackoverflow.com

Does anyone know what Hibernate's instrumentation task's perform extended instrumentation directive is? I have opened a documentation bug against it.

18. Extending Wicket's serialization test    stackoverflow.com

I'm working on a large Java application that uses Wicket 1.5 together with Hibernate / JPA 2. Wicket has a standard rule that objects stored in the session must implement Serializable. ...

19. Extend Seam-Hibernate validation?    seamframework.org

al whiting wrote on Apr 20, 2009 19:20: Thanks for the suggestion Dan but unfortunately at the point where we want to add this functionality we are not persisting anything. A bit more info... The user enters data into an HTML field, the value is applied to the backing bean onblur; the validators fire at this point and if the validation ...

20. Extend Seam-Hibernate Validation (more over)    seamframework.org

21. Extending Hibernate mapped class?    coderanch.com

Hi, I am working with an existing application and trying to find a best way to implement new changes. In this particular situation I have a class that I cannot change, similar to (to keep things simple): public Class Category { private String name; private Category parentCategory; private Set childCategories = new HashSet(); ...... } This class is mapped to a ...

22. Extending the Hibernate session to include the view rendering    coderanch.com

Hi guys, I'm learning to do "pretty" websites with Hibernate as ORM, Spring as IOC and Spring MVC, with Velocity as a template engine for the presentation layer. I recently hit on the standard "lazy loading in view" problem meaning that in Velocity i can't call a getter for which Hibernate should fetch an lazily associated object because by the time ...

23. How to extend JPA entity NamedQueries?    coderanch.com

OK. These two are just nitpicks and you don't have to change it. 1) I put my Named queries above the @Entity because Named Queries, while you have them in a class are not scoped to the class but to the SessionFactory. 2) What is with all those front underscores. "_". This is Java we don't use underscores in variable names. ...

24. Mapping extended data types possible?    forum.hibernate.org

25. EXTENDED Persistence Context does not work with EpAT    forum.hibernate.org

Hello, I'm trying to port a JPA based, standalone application to Hibernate but I'm heavily struggling with the following problem: The documentation for Hibernate EntityManager clearly states (see http://docs.jboss.org/hibernate/stable/ ... tions.html ): "The Hibernate Entity Manager may be disconnected from the underlying JDBC connection between two client calls and reconnected when a new client request occurs. This pattern is known as ...

26. Issue while trying to map extended class    forum.hibernate.org

Hi all, I have an issue with inheritance mapping, hope you can help. Having the following structure: Quote: @Entity @Table (name= "Persons") @Inheritance (strategy=InheritanceType.JOINED) @SequenceGenerator( name="SEQ_PERSON", sequenceName="SEQ_PERSON") public class Person implements Serializable { @Id(name = "personId") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_PERSON") private Long id; @Column(name = "name") private String name; //etc } @Entity //DONT KNOW WHAT TO DO HERE public class PersonWithDogs implements Serializable ...

27. how to extend from a mapped class    forum.hibernate.org

Hi, I have a mapped class 'Vendor' in a separate jar, that means, I can't make modifications to it. I want to load 'Vendor' objects using it's mapping but also want the 'Vendor' object to implement my java interface 'GenericCompany' (something like an adapter pattern) so that I can treat 'Vendor' and my own 'Company' object uniformly. I don't have access ...

28. Extending HQL with new tokens    forum.hibernate.org

I'm working in a project to add Fuzzy query capabilities to HQL. http://en.wikipedia.org/wiki/FSQL I'm trying to extending HQL in the following way: - Create new tokens, like FEQ. - Rendering sql from this token. Example: FEQ is a binary operator HLQ: select c from Car c where c.colour FEQ 254; I want to render something like this into SLQ: select c ...

29. criteriaSearch not working due to extended value obeject cla    forum.hibernate.org

I have user value object class which has login info along with that other 5 value obeject class extends user now if I implement crieteriaSearch as follows public Object crieteriaSearchUser(userVo louserVo) { Map loCrieSearch = new HashMap(); loCrit = sessionFactory.getCurrentSession().createCriteria( userVo.class); if (!louserVo.getUserName().equals("") ) { loCrit.add(Restrictions.like("userName",louserVo.g etUserName()+"%")); } loCrieSearch.put("allUserList", loCrit.list()); logger.debug("class Name :commonDo Function :crieteriaSearchDiscount Status : Exiting "); ...

30. Extending Hibernate Classes    forum.hibernate.org

We need to pass values from the application through JDBC other than in SQL statements. Particularly we need to pass values in the JDBC connection URL and Username and Password fields. We were hoping to use an Expression Language as the parameter to the JDBC connection for URL and Username and Password. So if that isn't currently possible, can we do ...

31. Extending org.hibernate.dialect.MySQLDialect    forum.hibernate.org

Newbie Joined: Sat May 29, 2010 9:39 pm Posts: 1 Location: Mclean, VA, USA We are hoping to do local development against MySQL, our production environment is running against Oracle. For local development, MySQL is installed on each developers machine. Our Java application code uses annotations for sequences, because sequences are handled in Oracle (our production environment). Initially when I was ...

32. Help on extending an hibernate object    forum.hibernate.org

Hi, I am having a transaction table , which has got 75 columns. In future,more columns will be added to the table based on the requirements. It has got more than two million records. Is there any way to add the new columns to a new table which will be an extension of the existing table ? I have tried of ...

34. Extending Hibernate's persistent collections globablly    forum.hibernate.org

Hi! I'm trying to add a slight change to all hibernate persistent collections (PersistentSet, PersistentList, etc). I have extended each of these classes, and would like Hibernate to use my custom implementations for all collection wrappings. Is there a way to configure that in Hibernate? I though about using a custom collection type that does nothing but wrapping the collections with ...

35. Insert/Delete Causing Failures with Extended Persistence    forum.hibernate.org

So I am using Hibernate to manage a large object graph using an extended persistence context. I am running into issues where an object is added to the persistence context. The object is mapped to a collection encapsulated within an entity via a OneToMany mapping. The object that is added to the collection is a complex type with other encapsulated entities. ...

36. Extend a class without implicit inheritance?    forum.hibernate.org

Here is the scenario. I have Class A and Class B. B extends A in Java. Each has it's own table with it's own set of columns. Example: Code: @Entity @Table(name="MyA") public Class A { private firstName; private lastName; public String getFirstName() {...} public void setFirstName(...) ...

37. Extend java.util.TreeSet and hibernate    forum.hibernate.org

don't think so..to my knowledge, the only SortedSet implementation you can initialise your collection with is TreeSet.. Now, having said that, if natural ordering is not good for your requirement, you *should* be able to get the same SortedSet result by using the @Sort Hibernate annotation and providing a Comparator as in: @OneToMany @Sort(type=org.hibernate.annotations.SortType.COMPARATOR, comparator=YourComparator.class) Note, that, in case this is ...

38. Extending enums --- Thoughts??    forum.hibernate.org

Hi, I am looking to implement something in Hibernate. Not sure if I am going in the right direction. I have a class Task that looks something like this: Code: @Entity @Table(name="task") public class Task { @Id private Long id; ...

40. Problem on Using PersistenceContext.Extended    forum.hibernate.org

Hi, I am using @PersistenceContext(type=PersistenceContextType.EXTENDED) . When I am trying to fetch records from database using jpa query which are persisted by another application . It is working fine on fetch newly persisted record . but when i try fetch updated existing record it is giving old value. please assist. thank you.

41. Registering REGEXP_LIKE in a extended Oracle10gDialect class    forum.hibernate.org

public class NewOracle10gDialect extends org.hibernate.dialect.Oracle10gDialect { public NewOracle10gDialect() { super(); // registerFunction("regexp_like", new VarArgsSQLFunction(new BooleanType(), "REGEXP_LIKE", ",", ")")); // registerFunction("regexp_like", new StandardSQLFunction("REGEXP_LIKE", new BooleanType())); // registerFunction("regexp_like", new SQLFunctionTemplate(new ...

42. Extended instrumentation? Not in the manual.    forum.hibernate.org

43. Extended create statement    forum.hibernate.org

Hi, I am currently involved in working with Hibernate against a upcoming database platform called SQLFire. The problem I have is that SQLFire requires custom entries within the DDL create statements. I have looked in the org.hibernate.mapping.Table and org.hibernate.dialect.Dialect (I have also checked org.hibernate.DerbyDialect which SQLFire impersonates by default) and cannot see any obvious way of extending how the create statements ...

44. SFSB PersistenceContextType.EXTENDED Exception handling    forum.hibernate.org

Newbie Joined: Thu Oct 13, 2011 2:09 pm Posts: 3 Hi, how can I recover from PersistenceException in StatefulSessionBean. I'm using EntityManager with PersistenceContextType.EXTENDED. It seems that after a PersistenceException I cannot use the EntityManager any longer. But how can the user fix wrong data input? In my sample code I simulate the following scenario: 1. User creates new entity and ...

45. Extended sessions vs equals/hashCode...the final word?    forum.hibernate.org

My application has been using detached entities, application-generated-IDs (GUIDs), and overridden equals/hashCode as espoused in this article with good success. I've been revisiting our design because we have a need for DB-generated IDs, so I reviewed this forum post post, wherein a Hibernate team member strongly asserts that extended sessions are preferred to assure equals/hashCode correctness. Say I redesign my webapp ...

46. Extending the new Query by Example API    forum.hibernate.org

Hi, as we use Query-by-Example very frequently in our application, the new API is allready a huge improvement for us. However we often have example objects where the data entered by the user is used as a prefix of the data to be displayed. So what we need to do now is to append % to all propertys of the example ...

47. Possible to map extended classes COMPLETLY to seperate table    forum.hibernate.org

Hi, is it possible to map extended classes completly to seperate tables? I have class A class B extends A class C extends A I want to map B to table "b" with all all attributes of A+B, similar for C I do not need a table for A (A is abstract, so does not help) I do not want B ...

48. SAXParseException: Attribute "extends" must be dec    forum.hibernate.org

When I used hbm2java, I got the following error message: Code: SAXParseException: Attribute "extends" must be declared for element type "joined-subclass". my hbm.xml file is as follows: Code: ...

49. extend criteria api to return maps    forum.hibernate.org

Hello! After trying some things with hibernate, it comes to me, that i miss a feature. The only access to the result set has to be done through list() (for now), but often i would like to get a set of records, and access them by some custom key. There are not soo much changes to such a table, and so ...

50. possiblility of extending Hibernate's ConnectionProvider    forum.hibernate.org

Hi, I'm interested in using C3PO, or DBCP with HIbernate. I find JNDI to be more trouble that it is worth when trying to run unit tests. At this point, most of the projects I work on are routing all access to db connections through hibernate, providing an easy way to change our configuration from unit testing with local jdbc connections, ...

51. extends classes of hibernate    forum.hibernate.org

I have a schema : .... Than produce this file : (mapping objet) /** @author Hibernate CodeGenerator */ public class DBUser implements Serializable { .... } I create this file: (entreprise object) public class Utilisateur extends DBUser { } Is it a good way ...

52. Suggestion to extend discriminator, discriminator-value    forum.hibernate.org

Here a thought, (maby in your minds ...) I was looking for a solution to have a subclass with a discriminator value like for example kind='x' or kind='y' . As I can see we can only have 1 descriminator with 1 value. One solution (the wuick one) whihc be to allow a value for teh discriminator-value like "'x' || 'y'" which ...

53. extends and polymorphic association    forum.hibernate.org

Question 1: In reference guide 5.5: "..you can use "extends" ..... use of this feature will make the ordering of the mapping documents important " I am using the schema export tool to generate database schema and want to have classes in a hierachy in separate mapping documents and therefore "extends" is used. How do I specify the ordering of mapping ...

54. Extending Hibernate Internals    forum.hibernate.org

I am looking to plugin a framework, Meta-JB ( http://sourceforge.net/projects/meta-jb ) into the Hibernate. Instead of returning concrete objects from a query, I would like to be able to wrap the invidual rows as metaObjects (basically Map-like name/value pairs). I was wondering if the Hibernate API has some interfaces that can be implemented to hook in as we need to. Is ...

55. Extended Objects    forum.hibernate.org

56. Extending Idbag    forum.hibernate.org

57. Extending the Hibernate Session to provide isTransactional()    forum.hibernate.org

I would like the ability to detect if a transaction is in progress or not so I can conditionally commit(), i.e. if there was already a transaction in progress then let the calling business method commit otherwise commit within the current busines method. If we were using a higher level (JTA) transactional context this wouldn't be necessary but unfortunately we're not. ...

58. extending AbstractCollectionPersister for auditing purposes    forum.hibernate.org

Hi there I'm working on a project that uses DB triggers to audit changes made to the data on the db by the application. For every table that is getting audited there is a journal table containing all the information of the original table plus additional auditing information. Example: Code: USER_TABLE: USER_ID USER_NAME ...

59. Trouble with extends files    forum.hibernate.org

60. How to extend a base class wich has no table???    forum.hibernate.org

Dear all, We have many classes that are represented in the DB.And each of these classes extends a Base class.The existing application uses struts & spring. Now the problem is we are new to Hibernate and wish to include hibernate into this application. So we wish to extend this base class(-this class contains 4 variables which are common to all the ...

62. Map a class that extends and implements    forum.hibernate.org

Can you post your best guess at what you are trying to do, what you originally posted is not really clear as to what you want. I have mapped classes that extend some class and implement interfaces... I assume you know that if you map A, then no B's or C's will be mapped since they are above A in the ...

63. How to map class A extends B    forum.hibernate.org

64. Extend Hibernate for non-SQL (OOP) database?    forum.hibernate.org

I have an interesting project : For phase 1, I have to reengineer some existing code that uses a Sybase database. The schema will likely change, so Hibernate seems like an ideal way to minimize how that will impact me. For phase 2, I will have to stop using Sybase and instead switch to using a *proprietary* in-house, non-SQL, "OOP-like" database ...

65. Collection mapping with user extended collection types?    forum.hibernate.org

Hi, this is a general question. I read in the documentation that Hibernate does Collection mapping with lazy loading by silently replacing Set, List, etc. with the respective Hibernate extensions. That is great. But what if my associations in my domain model use user-extended associations already? Our beans all use a user extended collection called AssociationSet. Will I have to replace ...

66. extended HSQL dialect    forum.hibernate.org

67. Problem on hibernate extend class mapping    forum.hibernate.org

Newbie Joined: Wed Mar 09, 2005 11:39 pm Posts: 1 Situation is: I have downloaded an external lib with parent class X (eg. com.company.Sample), then I wrote a class Y (eg. my.classes.Sample) that extends class X and need to map it in hibernate. Since the external lib fetches class X directly I must declare tag in .hbm.xml file, so I ...

68. Extending Persister to modify queries    forum.hibernate.org

69. extended many-to-many association    forum.hibernate.org

70. Extending a model with plugins    forum.hibernate.org

We are working on a model which maintain in a DB a formal description of a content. So there are, for a certain view, a list of elements of different types (string, memo, integer, etc), representing a form. We are on early steps, yet, so we are searching for best approaches. I want to use Hibernate, I did some test and ...

71. Hibernate3 and nested classes (or extending hibernate?)    forum.hibernate.org

Hi, I am using hibernate3 and think its quite a nice piece of software. Unfornutately I am having the job to extend hibernate for use with objectteams Java (http://www.objectteams.org) and the codebase of hibernate is somewhat overwhelming to me. As a short explanation, Objectteams is an extension to java that introduces teamclasses and roleclasses. An example of Objectteams looks like this: ...

72. Extend Simple Datatype Class Behavior    forum.hibernate.org

I've got a quick question. I have an object which extends the behavior of the GregorianCalendar class, and was having issues getting it to persist. The problem arises when it comes to selecting a datatype field in the hibernate mapping file. If I choose to go with specifying the type of my sublclass, then hibernate looks for a binary field. If ...

73. Ambiguous column problem with the query fo extended objects.    forum.hibernate.org

Hi, We have working with a number of dataobjects which are lying in multilevel inheritence hierarchy. Object's hierarchy is like, BasicObject < ServerObject < Folder < AObject All the objects do have 'OBJECT_ID' field with it. Now if I want to fire a query on 'basic object' table, like from ServerObject where OBJECT_ID = 1 We are getting an invalid query ...

74. Extended classes    forum.hibernate.org

Hello, I have an abstract BillingDetails superclass and 2 classes which extend this, namely Account and CreditCard (both of these classes have further Objects mapped onto them) A Payment class has a BillingDetails attribute. If I run a hibernate query "find all Payments" then I get back a mixture of payments made with both Accounts and Credit Cards. However if I ...

75. "extend" from "entity"    forum.hibernate.org

76. Refactor HibernateException to _not_ extend RuntimeException    forum.hibernate.org

Hibernate version: 3.0.5 There seems to be an ongoing discussion whether having HibernateException extend RuntimeException is a good idea or not. In my organization we develop applications that are supposed to work even when a database connection goes down, and we hence cannot comply with the new guidelines of Hibernate 3. Moreover, as we consider catching RuntimeExceptions to be Java mal-practice, ...

77. Can't build mapping files when class extends ex-project root    forum.hibernate.org

[b]Hibernate version:[/b] 2.1.6 [b]Mapping documents:[/b] I can't get maven to build them. [b]Code between sessionFactory.openSession() and session.close():[/b] Not a java coding problem. [b]Full stack trace of any exception that occurs:[/b] Not a java coding problem. [b]Name and version of the database you are using:[/b] The problem occurs before I need to poke at a DB. [b]The generated SQL (show_sql=true):[/b] The problem ...

78. Extending a Hibernate Object (newbie question)    forum.hibernate.org

I have a simple application in which there is a Hibernate class for each table. To make the application easier to maintain I want to extend the Hibernate classes and put the application specific code in the subclasses. Ideally I would like to make the Hibernate classes abstract. When I add application specific code I will modify the subclass and not ...

79. Extending org.hibernate.cache.EhCacheProvider    forum.hibernate.org

Hi, I would like to make ehcache look for the config file ehcache.xml in a location that is not directly in the classpath but rather in a sub directory. The only way I found to do that is to copy org.hibernate.cache.EhCacheProvider, change the start method to the following and config hibernate to use my implementation: Code: public ...

80. Persisting Extended Collections    forum.hibernate.org

82. Feature Req.: More flexibility initalizing/extending cache    forum.hibernate.org

Hello, For EHCache the default disk cache file location is something like this: /tmp/org.my.package.SomeClassFile.data. This doesn't work in an Enterprise environment. One example of this is what do you do if you have multiple instances of the same app running on the same server? There are two ways to solve this: - modify the java.tmp.dir, user.home, or the user.dir system properties ...

83. Why the HibernateException.java extends RuntimeException    forum.hibernate.org

Hibernate3.x.x Why the HibernateException.java extends RuntimeException since version 3.x.x? I think it is not a good choice,because you'll not be fored to throw a HibernateExcetion when you are coding with Hibernate3.x.x,for example. The Class DAO was written by user A who isn't a careful person,the source code of DAO.java may be: class DAO{ pubic void create(Session session,Object obj){ session.save(obj); } } ...

84. Annotations - no primary key - generics    forum.hibernate.org

@Entity public class History extends BaseClass { private List versions; ... @OneToMany( targetEntity=Version.class ) public List getVersions() { return versions; } ... }

85. joined-subclass to define C extends B extends A relationship    forum.hibernate.org

Hibernate Version : 3 Database: Sybase 12.5.1 WebLogic 8.1 Hi, I have seen plenty of examples using the joined-class to define the B is a Subclass of A relationship. What I would like to define in my mapping file is the C is a B is an A(or C extends B extends A). Am I right to assume I can use ...

86. Extending persistence model using events    forum.hibernate.org

I'm trying to extend JBoss Portal, which uses Hibernate3 to manage its user profile information in an RDBMS, to persist some of its user fields to a Siebel CRM instance instead of the database. Unfortunately, while JBP separates its user management API into a separate module, the API for this interface assumes a session-based transaction model, e.g. there's no explicit "Save" ...

87. Extending tables in Hibernate 3    forum.hibernate.org

We're having a problem with extending tables in Hibernate 3 (where in Hibernate 2 everything worked fine.) Using Hiberante 2 we had 2 tables, one extending the other. The tables in question were: NOTIFICATIONS NOTIFICATIONID BIGINT NO DEFAULT YES(1,1) CREATED TIMESTAMP YES ACTIONID INTEGER YES OBJECTID BIGINT NO OBJECTTYPE INTEGER NO RECIPIENT VARCHAR 50 YES CREATOR VARCHAR 50 YES MESSAGE VARCHAR ...

88. Mapping problems, extending questions    forum.hibernate.org

Hi Manny, what you have is: User: OneToMany to Account Account: ManyToOne to User You mustn't use OneToOne on the Account-side. Here's an example: I have a ManyToOne relationship between Item and Definition. I have annotated both ends of the relationship: Code: class Definition { private List items; @OneToMany(mappedBy="definition") ...

89. Undescriptive MappingException concerning extends    forum.hibernate.org

I looked into the problem myself, and it appears the null originate from org.hibernate.cfg.HbmBinder, on line 2984 (in my version of the source): final String extendsName = element.attributeValue( "extends" ); It is not checked here that the document contains an extends attribute. Ignoring that possibility will lead to nulls leaking into the metamodel and later propagating themselves into errors. I suggest ...

90. extending sql dialect    forum.hibernate.org

hi! i'm trying to extend the default sql dialect for mysql and add a new function (that is recognized by the mysql 4 syntax). i've created the class below and set the dialect property accordingly. however, when i run a hql query that uses the newly added function i get an exception that makes me think hibernate doesn't recognize this function... ...

91. extending DefaultSaveOrUpdateEventListener    forum.hibernate.org

Hibernate version: 3.1 I have User and UserGroup tables and corresponding hbm.xml and Java Objects User has a set of UserGroup objects lazy="false" I created CustomSaveOrUpdateListener extends DefaultSaveOrUpdateEventListener within transaction, when I query User object from the db inside the transaction using Criteria API, onSaveOrUpdate is triggered, why is Hibernate triggering onSaveOrUpdate during query operation? Any ideas? Thank you, Igor

92. Extending class definition    forum.hibernate.org

Hello, I have a table like this: create table category ( category_id // is the primary key name parent // for a hierarchy category } My mapping is something like this I need a query with a organized hierarchy, something like this (in oracle) SELECT ...

93. Extending a persisted superclass while keeping same ID    forum.hibernate.org

Hibernate version: 3.2.1.GA Mapping documents: Javax annotations I have the following inheritance structure: Class A Class B extends A Class C extends B They are stored in the database using a Table-per-subclass strategy (InheritanceType.JOINED in javax.persistance). The ID is in class A and is a generated value. I have an instance of class B (and therefore A) persisted to the database ...

94. hibernate many-to-one/extends problem    forum.hibernate.org

95. extends and implements at the same time    forum.hibernate.org

96. Extending a annotaded class    forum.hibernate.org

hi, I'm facing the following problem: All my mapped objects extend an abstract class, and some of them has a kind of template classes, well, I'd like to know if I could put some annotations on these templates. I`ve tried, but the hibernate doesn`t get these annotations. Is there some annotation to "say" to hibernate to get the annotations in the ...

97. Technique for dynamically extending table    forum.hibernate.org

98. Extending persisted class with non persisted variables    forum.hibernate.org

I have a class SocPatient.java with a corresponding table Soc_Patient and a hibernate mapping file SocPatient.hbm.xml. I extended this class in order to add two non-persisted booleans (which I only need to keep around for JSPs) in the following fashion: Code: public class SocPatientChild extends SocPatient { private static final long serialVersionUID = ....; private ...

99. How to extend a mapped class from another project?    forum.hibernate.org

Hi you all, I have a core project that consists of mapped classes. There are a couple of other projects, that use the core project as a DAL. These projects has no mapped classes. Now for the question : I want hibernate to retrieve me an extended class, that uses specific services from the depending project, without getting a cyclic projects ...