1. compiling with the -Xlint:unchecked attribute forum.hibernate.orgHI there, When I compile my project using ANT the compiler states the following: compile: [javac] Compiling 2 source files to C:\Scholastic_Hibernate\build\classes [javac] Note: C:\Scholastic_Hibernate\src\java\scholastic\models\Company.jav a uses unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. My build.xml file has the following: |
2. Bug since 3.2.2 when selecting many-to-one attribute forum.hibernate.orgHello, I suspect a (major) bug here, there is wrong behaviour that occurs since version 3.2.2 and has never occurred with older versions (3.2.1, 3.1, 3.0, 2.x). Hibernate version: 3.2.2 Mapping documents: (the mapping is only a partial example) |
3. How to reset a value of a attribute(column) of a row? forum.hibernate.orgHi I have a basic question(being newbie to hibernate) I use hibernate to load Objects from Database. Once I load the object with let's say 10 attributes, how do I reset the value of few of those attributes? If I call the setter method and pass null, that works but when I commit, the actual values in the database are not ... |
4. Getting the map-key column attribute at runtime forum.hibernate.org |
5. Get attribute from join table forum.hibernate.org |
6. many-to-one not-found attribute not working forum.hibernate.org |
7. About Hibernate Category Attribute forum.hibernate.org |
8. Using formula attribute for non-primary-key column map index forum.hibernate.org |
9. How to use java.util.Map as Entity attribute? [Solved] forum.hibernate.orgI've found the source of problem: I've forgot to use @CollectionOfElements annotation. So the correct source is: @Entity public class Sport implements Serializable { //... private Map |
10. Problem with CURRENT_TIMESTAMP in where attribute of |
11. ClassCastException occurs using Set elements sort attribute. forum.hibernate.orgHello, I have strange problem occuring when executing one of my test class in my project. This is the snippet of Set mapping i am doing in my hibernate mapping file for Category1Category2.java model |
17. [Mapping]How to have an attribute referecing another DB ? forum.hibernate.orgHi, hi have a DB which contains a USER table, allowing to determine which Hibernate session (linked to anoter DB) to use for the connected user. The problem is that some tables of these anoter DB are referencing the obejct USER. Is that possible to configure the mapping files so that the "user" attirbute references another DB ? My mapping : ... |
18. Formula Attribute forum.hibernate.orgBefore inserting card number into database, I need to perform encryption using below formula. In Mapping I did like below |
19. Missing column when doing insert with formula attribute forum.hibernate.orgNewbie Joined: Mon Jun 25, 2007 3:43 am Posts: 1 Background: Our application uses a "subclass-per-table"-hierarchy. The superclass, called LogRecords, holds a discriminator column. The application consists of two, standalone, parts: one which logs data to the database and one which reads data from the database. The reading part may use a different version of the mapping files than the logging ... |
20. Once again: Many-to-many with attribute ... still painful? forum.hibernate.orgHello. Over a year ago I wrote about how to map a many-to-many relationship that had an attribute in the link table. It was a painful experience. I wound up doing it all by hand. XDoclet wouldn't generate my tables correctly so I hand-hacked my mapping files. And I couldn't find a way to tell Hibernate to deal with the attribute ... |
21. "mutable" attribute ignored when using 2ndLevelCac forum.hibernate.orgHello, many entities in my application are read-only, so I use the mutable="false" setting in their mapping files. This causes Hibernate to set their status to read-only and omit the snapshot creation (TwoPhaseLoad, lines 172-178). This read-only status in turn optimizes flushing performance since the PersistenceContext's "hasNonReadOnlyEntities" flag is false when only read-only entities are in a session, causing flushing attempts ... |
22. non-primary-key attribute 'id' mapped to primary-key forum.hibernate.orgHi! I got an entity which has a non-primary-key attribute named 'id' (I know that's a crap, but can't change this). The primary key id is named 'guid'. Whenever I use a query I'm searching for the attribute 'id', e.g. Code: from TestUser u where u.id=:id and u.name=:name; the parameter 'id' is not mapped to 'id' but to 'guid' (see generated ... |
23. Custom XML elements/attributes in Hibernate mapping forum.hibernate.org |
24. The mapping attribute parent="xxx" doesn't work forum.hibernate.orgThe mapping attribute parent="xxx" doesn't work Hibernate Version: version 3.2.5 Code: |
25. One-to-one with outside attribute? forum.hibernate.org |
26. How to add attribute (ie. hardOneToOne=true) to @OneToOne forum.hibernate.orgFolks, I would like to extend the behavior of @OneToOne I want to add an attribute to the annotation. Is that code extensible enough for me to do this? Implementing my desaign off of existing attributes mutes out original and itnended behavior of the annotation itself. In order for me to properly segregate the outcome, I would like to extend the ... |
27. entities order by dynamic attribute forum.hibernate.orgHello, I use a dynamic-map-entity which has a map of attributes stored in a second table. Accessing the entities works fine with an own tupelizer. Now I want to use queries with "order by" on the dynamic attributes. I tried this, but it does not work: String query = "FROM " + entity + " AS entity" + " JOIN entity.attributes ... |
28. SQL union is not working in SQL query for property attribute forum.hibernate.org |
29. Lazy Attribute forum.hibernate.org |
30. how to map max() value as attribute forum.hibernate.org |
31. Type of |
32. HQL : how to update attribute of derived class? forum.hibernate.orgString sql = "update B set quantity = :newQuanity where oid = :oid"; Query query = session.createQuery(sql); query.setString("oid", a.getOid()); query.setLong("newQuanity", quanity); ... |
33. Can i get all dirty attributes ? forum.hibernate.org |
34. How the cascade attribute shall be set? forum.hibernate.orgI have various one-to-many situations where parent/child update have different requirements and I currently only use the parent object merge for all changes on parent and child. 1) update on parent without any change on its childred. Shall I set cascade="delete-orphan"? 2) update on one child. Shall I set cascade="merge"? 3) add one child. cascade="save-update"? 4) delete one child. cascade="save-update"? Shall ... |
35. Mapping a class without an id attribute forum.hibernate.org |
36. Criteria queries problems using sub-class attributes forum.hibernate.org |
37. Question about "version" attribute names in MySQL forum.hibernate.orgIt's definitely not a bug. Just because "version" has special meaning in hibernate( to control concurrency ). I don't know what tool you use to "produced" the mapping file but, I think it mistakenly treat that version property as version. Just like if you have a id property, it will by default be treated as id. That's why I prefer hand ... |
38. Use of map-type attribute in queries forum.hibernate.orgMore exact, these are my classes: @Entity @Indexed public class Ficha { @Id @DocumentId private Integer id; @IndexedEmbeded private Translation translatedName; @IndexedEmbeded private Translation translatedDescription; .... ... @Entity @Indexed public class Translation { @Id @DocumentId private Integer id; @IndexedEmbeded Map |
39. Map Relationship Attributes to multiple properties forum.hibernate.orgHi! I have the following problem where I wanted to map relationship attributes on different properties. The example is situated in the domain of theatre shows. The theatre has several seats and each seat can be sold for a different show. A reseller can then by a contingent of seats for a certain show and assign a price to every seat. ... |
40. meaning of discriminator-value attribute of class tag forum.hibernate.orgFollowing is a description that is been taken (extract) from Java Persistence book. Credit goes to the authors. I just worded a different similar example. This is a case that I know where it can be used. Suppose we have two (it can be as many as possible) classes (that has some common/general properties) in Java and one table to represent ... |
41. Usage of mutable attribute. forum.hibernate.orgHi all, We have to deal with a class used by our application in the following way : - read entities - insert new entities - NEVER update entitites - NEVER delete entities Is the usage of the class attribute mutable="false" is appropriate in this case to get some hibernate optimizations (which ones ? ;)) Or is the mutable="false" should only ... |
42. @Column attribute validation forum.hibernate.org |
43. Hibernate not Setting Class Attributes forum.hibernate.orgI have code similar to the code in section 6.1.5 of Java Persistence with Hibernate. This is the case where an owning class (let's call this Class1) uses a Map to store many instances of a second class (let's call this Class2). The objects of both classes are being persisted as I can see the data in Oracle using an external ... |
44. insert="false" attribute question forum.hibernate.orgI have a property mapped like following |
45. Errors with lazt attribute in "select new" forum.hibernate.orgNewbie Joined: Thu Jun 26, 2008 12:50 am Posts: 8 Hi, We've got a problem where we are using "select new" to create a pojo that contains the results from a query that gathers summary information from the system. The query is simple getting a code and a count of unmatched rows in our DB: Code: final Query peerOrgCodeQuery = em.createQuery( ... |
46. Mapping N:M relationship with characterizing attributes forum.hibernate.orgHi all I'm new in Hibernate programming and I've a problem defining a N:M relationship with attributes. For example, suppose to have the following data model: CREATE TABLE Concept ( id CHARACTER VARYING(20) NOT NULL, description TEXT, ... PRIMARY KEY(id) ); CREATE TABLE Feature ( id BIGINT NOT NULL, name CHARACTER VARYING(20) NOT NULL, ... PRIMARY KEY(id) ); CREATE TABLE ConceptFeatureRelationship ... |
47. One class with attributes coming from different tables. How? forum.hibernate.orgHi folks, I've got to fix a system that uses hibernate, but I'm new to it, like 2 min or so ... but 'cause so new to it I'm even having trouble googling for help! The current situation is the following: There's 1 table A with cols a, b, c that generates a class A with attributes a,b, c. How I ... |
48. Mapping Help - ManyToMany Mapping with Single Join Attribute forum.hibernate.orgI have two tables in a many to many relationship. Users ==== id: int name: string Raw Data: ==== id: int latitude: double longitude: double Raw Data Users ========== user_id: int raw_data_id: int selected: boolean I was wondering which method would be the best way to handle the many to many mapping such that I could get the select value from ... |
49. recommended attributes to define on a one-to-one mapping? forum.hibernate.org |
50. Update object attribute from another object's prepersist forum.hibernate.orgHi, For some reasons, in our system, we'll have to update the version number of a parent object whenever its child object is being updated. (they're having OneToMany relationship and cascade all) We have created an unit test which updates one of the attributes of the parent object in the prepersist callback of the child object. Hibernate looks working fine with ... |
51. Fetch attribute help needed forum.hibernate.orgBeginner Joined: Sun Oct 14, 2007 7:29 pm Posts: 23 Hello, I am still somewhat new to Hibernate and trying to undrestand the fetch attribute of associations. I don't quite understand the implications of comibining fetch = "join|select" with lazy = "false|ture" and was hoping to get some guidance. I have four scenarios below with a sample mapping file -- would ... |
52. Attribute "not-found" must be declared for element forum.hibernate.orgHi, When I try to load the following hbm file I get this exception. - Error parsing XML: XML InputStream(40) Attribute "not-found" must be declared for element type "many-to-one". I checked the hbm file and it has not-found attribute specified and I also observe that that not-found clause in hibernate has a default value also. Can you please guide me? ################### ... |
53. Regarding formula attribute forum.hibernate.orgHi, ParentMessage and Message are the tables. I have a collection field called "messages "in the "ParentMessage" entity class. Now i want to get the name of the message which is having the maximum amount for each ParentMessage? Here name and amount are the columns in the Message table. I have declared one-to-many and many-to-one mappings in both the mapping files. ... |
54. Regarding formula attribute forum.hibernate.orgHi, ParentMessage and Message are the tables. I have a collection field called "messages "in the "ParentMessage" entity class. Now i want to get the name of the message which is having the maximum amount for each ParentMessage? Here name and amount are the columns in the Message table. I have declared one-to-many and many-to-one mappings in both the mapping files. ... |
55. length attribute missing on @Index annotation forum.hibernate.org |
56. Order by attribute in Joined Class forum.hibernate.org |
57. Attribute cascade in Hibernate and in the database forum.hibernate.org |
58. Attribute cascade doesnt work for me forum.hibernate.orgEl programa intenta grabar un lugar de estacionamiento antes que un usuario, porque eso es exactament lo que el "cascade" le est indicando que haga. Sin embargo, la estructura de tablas probablemente funciona en sentido opuesto, es decir, se necesita primero un lugar, y luego uno o ms usuarios que se refieran a l. Nota que, segn la secuencia de tu ... |
59. Hibernate XDoclet tag where attribute with dynamic value? forum.hibernate.org |
60. IQurey expression for enum property that flags attribute add forum.hibernate.orghi my class have a property named WorkType (enum) that added flags attribute. this property keep multiple enum value (FullTime | PartTime | Freelance). i want query using IQuery interface, but can't do it:( my query; (for example, my enum property value is "FullTime | PartTime | Freelance") IQuery query = Session.CreateQuery("select a from Entity.Advert a where a.WorkType = :p1 or ... |
61. Updating other attributes in the intersection table forum.hibernate.orgThis question is very common. As soon as you start putting extra information in the relationship table, even just a couple of extra files, it is not a relationship table anymore, but another entity. You should decompose your many-to-many relationship into one one-to-may relationship between contacts and contacts_custodians, and another many-to-one relationship between contacts_custodians and custodians. Very few real-life applications manage ... |
62. Persisting Derived Attributes forum.hibernate.orgHi, think of the following scenario: you have a class Person with firstname and surename, both with getters and setters. Since your table is large you want to avoid a full table scan when doing queries and therefore introduce an additional "SEARCH_NAME" column with an index. In the Java class you have a derived attribute returning this search name: public String ... |
63. Override an attribute and declaring it as @Id forum.hibernate.org@MappedSuperclass class User { private String username; // setters/getters... } @Entity class SubUser extends User { // How can I specify that I want the // inherited username to be the PK of this entity (@Id) // without changing the definition of User??? } ... |
64. What is meant by the attribute hibernate.cache.region_prefix forum.hibernate.org |
65. lazy attribute on many-to-many forum.hibernate.org |
66. Version attribute not refreshed in my Object forum.hibernate.orgYes, merge returns a merged instance of your entity, it does not reattach the current object, it copies it's state to a managed instance. Notice that the version number is not incremented immediately after calling merge(), because on session.merge() the state of the object is not flushed to the database, so the version number is not incremented. The number is updated ... |
67. How to add "owner" attribute when owner class vari forum.hibernate.orgI am adding a new feature to legacy code (i.e. I can't make large changes to old tables, especially no primary key changes). I am adding a Set of 'NewAttribute' items to several non-associated legacy classes which are represented in separate tables. I want these 'NewAttribute' items to live in a single database table and have an Owner attribute which maps ... |
68. How to create a query with attribute length > 0 forum.hibernate.org |
69. one-to-many on join table with shared primary key attributes forum.hibernate.org |
70. Is using proxy attribute is same as lazy attribute forum.hibernate.org |
71. A question with cache attribute usage when using Ehcache forum.hibernate.orgHi All , If one configures Ehcache as second level cache with Hibernate and uses a READ_WRITE strategy as say |
72. request for clarification about the 'length' attribute forum.hibernate.orgHI Simonm, Actually, length specify the lengh of the column of the perticular column, if u specify the length=50 ,then it will accept only 50 characters...... and if you not specify the length then hibernate intrnally specifies the length 255 for string type;;;(sorry for my english) ok.. |
73. Persist only an id attribute of an object forum.hibernate.orgHello, did you try making the Y attribute Transient (with the @Transient annotation)? If you only want to store Y's id you can create an attribute Yid in class X, and store that attribute in the DB instead of Y. You can use @PrePersist and @PostLoad events to load Yid and your real Y respectively. Hope that helps in some way. ... |
74. Self Many-to-Many Relationship with attributes forum.hibernate.orgI solved it doing this: Code: @Entity @Table public class A { ... private int id; ... private Set |
75. Criteria object can't access attribute? forum.hibernate.orgHello, I am new to Hibernate and am having problems accessing an attribute in my class with a Criteria object. This particular attribute is a class, and I need to query on one of that class's attributes. I can get one of the attributes, and I'm wondering if there is a "better" way to get attributes that are part of a ... |
76. catalog attribute is sometimes ignored forum.hibernate.orgHello users, I encountered the following problem with the catalog attribute in a hibernate mapping. Consider the following example: You have configure hibernate to use 2 databases ("db1" and "db2") where "db1" is the default one. And you have defined a mapping for a class "A" that is mapped to a table "tab_a" in database "db2" via the catalog attribute. Then ... |
77. Inheritance mapping: Accessing root class attributes/columns forum.hibernate.org9.1.4. Mixing table per class hierarchy with table per subclass You can even mix the table per hierarchy and table per subclass strategies using the following approach: |
78. "generated" attribute of "property" tag inserts NULL value forum.hibernate.orgHi, Thanks for your reply. That would work, but it seems that my particular case, that an interceptor would have additional overhead without much gain. Since I'm using envers and the only entities that I track the update time are all audited, this is a mute point. I'll just leave the code to set the date in the constructor. Thanks, Walter ... |
79. Cross-reference with attributes in table forum.hibernate.orgHi, I have been running into a problem with a table structure and trying to get it mapped properly to do cascading deletes. I have been reading over some web sites about how to deal with a many-to-many relationship and working with a cross-reference table. I am fairly comfortable on the concept and have my domain objects setup and working. My ... |
80. unsaved-value attribute in hibernate forums.oracle.com |