1. Using an Oracle Sequence on a non primary key? forum.hibernate.orgHey guys, I was wondering if it was possible to specify an oracle sequence on a field that is not a primary key through Hibernate. The docs indicate that you can only use the |
2. Using Numbers as Sequences in Oracle forum.hibernate.orgHi Folks, The tables on which I have to map my objects are using Oracle Number for all primary key fields. On some tables Oracle native sequences are installed. I'm using java.math.BigDecimal to represent the Numbers in my POJOs. Unfortunatly hibernate supports long, short and int for sequences only. Can I easily get around this limitation, if yes how? Thx Toby ... |
3. How to get a sequence value from a generator using Firebird forum.hibernate.orgI am trying to obtain the nexval in a sequence from a generator in Firebird. Configuration cfg = new Configuration().addClass( com.nash.value.Contact.class ); SessionFactory sessions = cfg.buildSessionFactory(); Session sess = sessions.openSession(); // obtain a JDBC connection and Transaction trans = sess.beginTransaction(); Contact contact = new Contact(); contact.setFirstName( "foo" ); contact.setLastName( "bar" ); sess.save( contact ); trans.commit(); The debug shows that the next ... |
4. Many-to-many, sequence and constraint violation forum.hibernate.orgHello, I have 2 tables with a join table and a many-to-many relationship : A --> AxB --> B A objects have a set of B objects. B objects do not have knowledge of A, but B objects can belong to many A objects, this is why I need a many to many relationship The A-id is generated with an oracle ... |
5. How to generate sequence for oracle db. forum.hibernate.org |
6. Error in sequence incrementation (hilo generator) forum.hibernate.orgHi, I'm basically inserting a value into a table, the id is properly generated using the hilo generator (but first value is 3 instead of 1 which is already strange) but the sequence table is not properly incremented. And the context itself is weird. I have two test cases, when I run them separately, everything's alright, my insert works with a ... |
7. custom Generator: In-Memory sequence manager ? forum.hibernate.orgIs there any thing like In-Memory sequence manager - That will improve the performance. Only for the first time an uid request,we need to go to the database for the value of the target column in the table which stores custom sequences(for example: talbe_sequence), update it with adding a custom INCREMENT value (configure it in the specified hbm.xml), and store the ... |
8. Oracle sequence error forum.hibernate.orgHi all, I need help because I have a problem with an oracle sequence. I answered to this post to help "jhcadr" but today I have this strange problem and I don't understand why. So I try to explain my problem. I use Hibernate 2.1.4, BEA 8.1 SP2 and Oracle 8. I try different version of Oracle drivers but it's always ... |
9. Sequence forum.hibernate.orgI have a question . I dont know how initialize the sequence in determinate number. My first Test were with general class"sequence" _sequence but no initialized. For other hand with generate class=seqhilo but i dont use oracle for this reason i want know how initialize in a number with a value i indicate |
10. relationship one-to-many ... insert sequence forum.hibernate.org |
11. ERROR: relation "hibernate_sequence" does not exis forum.hibernate.orgHello all, I am studing Hibernate to use it with a new project (DB is Postgresql 7.4 ), but got the following problem: net.sf.hibernate.JDBCException: Could not save object at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:744) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:717) at ConexaoHibernate.inserirEntidade(ConexaoHibernate.java:36) at Principal.main(Principal.java:29) Caused by: org.postgresql.util.PSQLException: ERROR: relation "hibernate_sequence" does not exist at org.postgresql.util.PSQLException.parseServerError(PSQLException.java:139) at org.postgresql.core.QueryExecutor.executeV3(QueryExecutor.java:154) at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:101) at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:43) at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:515) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:50) at org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1Statement.java:231) at net.sf.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:69) ... |
12. Sequence and Hibernate forum.hibernate.org |
13. sequence name generation on Postgresql ? forum.hibernate.orgthis.sequenceName = PropertiesHelper.getString( SEQUENCE, params, params.getProperty("target_table") + "_" + ... |
14. Hibernate Sequence and Oracle 8i forum.hibernate.orgHas anyone else had issue with Hibernate & Oracle 8i sequences? (We run 8i because our client does). Most of the time our sequences work fine defined as shown below: CREATE SEQUENCE STATE_ID INCREMENT BY 1 START WITH 1 MINVALUE 1 MAXVALUE 214748647 ORDER At one time the client DBA created the sequences with no minimum, no maximum and no order, ... |
15. User Oracle Sequence |
16. Function sequence error forum.hibernate.orgFolks Desperate times call for desperate measures We are randomly getting the following [16/01/04 16:19:31:772 UTC] 2cbf69df JDBCException E net.sf.hibernate.util.JDBCExceptionReporter TRAS0014I: The following exception was logged java.sql.SQLException: Function sequence error. error message which appears to cause Webshpere App server (V5 for iseries) to go into a loop and eat all the CPU. (accessing DB2) A full error trace is below [16/01/04 ... |
17. Generating properties with sequence forum.hibernate.org |
18. Multiple sequence columns forum.hibernate.org |
19. ID generation with Oracle insert trigger and sequence? forum.hibernate.orgI am using Hibernate 2.1.1 with the Oracle 9i database. What ID generation strategie do I have to set in the mapping file, if I want to to use a Oracle insert trigger for the primary key value generation of the pk column? The Oracle insert trigger is fired every time, when a new record is inserted into a table and ... |
20. TableHiloGenerator - single table for multiple sequences ? forum.hibernate.org |
21. db2 function sequence error forum.hibernate.orgMy apologies, as this may seem more of a JDBC question than a Hibernate one, but I'm grasping at straws here. I'm having a problem using a combination of Hibernate and JDBC code. More specifically, I have a process, based on Hibernate, that loads a bunch of data. I have another process, based on JDBC, that essentially performs maintenance on this ... |
22. Sequence forum.hibernate.orgOk here goes -- Got Hibernate working with Jboss and oracle... each table has a specific sequence/table Id... Person (table) has a Person_SQ for sequence on ids I have a person Object with Person.hbm.xml of: [code] |
23. unsaved-value and sequence forum.hibernate.org |
24. Non ID Sequence Values forum.hibernate.orgI've done some searching and read the mapping DTD but haven't found a way to generate a property value from a sequence without making it the ID for the class. |
25. Sequence id column does not support BigDecimals? forum.hibernate.orgHey, I am using Hibernate2.1 and I want to use BigDecimals for all my primary keys. When I tried to have a id column that was a BigDecimal type I got this: net.sf.hibernate.id.IdentifierGenerationException: this id generator generates long, integer, short at net.sf.hibernate.id.IdentifierGeneratorFactory.get(IdentifierGeneratorFactory.java:38) at net.sf.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:73) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:725) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:715) at com.hartehanks.baton.data.HibernateBase.save(HibernateBase.java:54) at com.hartehanks.baton.data.facade.Test.testInsert(Test.java:44) at com.hartehanks.baton.data.facade.Test.main(Test.java:23) Does anyone know why the sequence field ... |
26. Insert and sequence forum.hibernate.org |
27. Can't store row with DB2 Sequence forum.hibernate.orgHi, I am trying create an Database row, where the id is selected from db2 sequence but it doesnt work. i had already store a row in the DB2 but with hibernate uuid. I have search the forum and read the doku but i didnt find a suitable example. Any hints are welcome I have the followed situation. Code ... |
28. How to use DB2 Sequences with hibernate ? forum.hibernate.orgHi, can anyone explain me how i should use a db2 sequence with hibernate. Should i first read the sequence with a jdbc connection and than set the hibernate configured object to store the row. If so, for what is followed configuration, which i read from the official hibernate doku. |
29. Sequences with SAPDB forum.hibernate.org |
30. Update a column other than the id with another sequence forum.hibernate.orgI would like to know if its possible with hibernate to specify a sequence.nextval for a column that is not a id when a update or insert is called. If not, I guess I have to get the sequence.nextval with a sql statement and then update the column with that value. Regards Phuong |
31. JDBC Escape Sequences do not work forum.hibernate.orgJDBC Escape Sequences do not work in named native sql queries - I tried to used JDBC Escape Sequences in a named SQL query, it appears that Hibernate assumes braces i.e '{' and '}' as Alias names and an exception is thrown. This is the Query which tried using SQL Server dialect - SELECT CategoryService.ServiceID as {SearchResults.ServiceID}, CategoryService.Name as {SearchResults.Title}, CategoryService.Description ... |
32. hibernate_sequence.nextval forum.hibernate.orgTrying to get a sequence, I get output: select hibernate_sequence.nextval from dual I'm using the syntax that is found in the documentation, but it doesn't seem to be picking up my sequence name. Thanks, Steve -------------------------------------------------- Version: 2.1.2 Mapping Doc: |
33. i can't use the sequence of oracle forum.hibernate.org |
35. How to attach sequence to nonPK column forum.hibernate.org |
36. How can I put sequence in a property tag forum.hibernate.orgHi! I would like an auto increment field in a table, witch is not primary key, and not ID. I search everywhere but I not found the answer. The database is PostgreSQL but I don't like to use native SQL code (e.g. serial type) I tried the sequence in property tag, but i get error always. Can anybody help me? Thanx ... |
37. ClassCastException using sequence. forum.hibernate.orgCan someone please help. I have read multiple post on this subject and tried to find relief in the reference manual, but nothing helps. I'm getting this error. There was 1 error: 1) testInsertHighestDegreeList(org.ihets.ims.dao.hibernate.HibernateInquiryListsDaoTest)java.lang.ClassCastException at net.sf.hibernate.type.LongType.set(LongType.java:32) at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:48) at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:35) at net.sf.hibernate.loader.Loader.bindPositionalParameters(Loader.java:674) at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:713) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:836) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:856) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:59) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:51) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:419) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2113) at ... |
38. PROBLEMS WITH ORACLE SEQUENCES forum.hibernate.orgHello. I am trying to use Oracle (Oracle 9.2.0.4) sequences with Hibernate (Hibernate 2.1), and I am having trouble. Can anybody help me? The MAPPING DEFINITION that I have is the following: [code] |
39. Optimizing sequence read using seq.nextval forum.hibernate.orgHi, Hibernate makes two SQL statements when used along with a DB generated sequence. 1) Read sequence value 2) Insert the record... Is it possible to use a dynamic insert...like that can be used in a regular SQL? insert into tableA (id, a, b) values (seq.nextval, 10, 20) Any suggestions? I am using Oracle, Thanks. |
40. Defining a field / attribute to be a sequence forum.hibernate.orgHi, I want to define a class attribute to be a sequence, generated by the DB. This attribute is not used as a primary key though. Can't find out how to do that. It is obviously possible and well documented if the field is defined as a key, but not in other cases. Thanks, Philippe |
41. Caching ORACLE sequences forum.hibernate.orgI am using Hibernate 2.1 with Oracle 8.1.7. I have an class in my model as : Code: package tavant.platform.persistence.hibernate.model; public class Note { // PK field private Long id; // Attribute fields private byte[] notes; private Double type; ... |
42. hibernate sequence id generator and PostgreSQL forum.hibernate.orgHi, We are trying to use the 'sequence' generator type for IDs in PostgreSQL but the columns are created as bigint and there appears to be no way to generate the next ID in the sequence. I guess this is only a problem since we have applications that are external to hibernate creating records. Has anyone managed to work around this? ... |
43. Does Oracle not support sequence? forum.hibernate.org |
44. Oracle sequence + Date format forum.hibernate.orgHibernate version: 2.1.5 Hi all, I have a problem concerning Date and I understand nothing about it, it's crazy. I have a table very simple with Id, Name and Date... only for test. I create a POJO object like this : Person p = new Person(); p.setName("Doo"); p.setDate(new Date()); If I use that code, my key is strane in database 4,54154541E12. ... |
45. Using one sequence per table forum.hibernate.orgThe rules in Oracle are 1 sequence per table because if you drop a table and populate it after you can have a hole in your sequence of several values. So for the references tables use an unique specific key and for data tables use one seuqence for each and with hibernate reference them in your mapping files. |
46. Error Occurs when trying to Insert into datbase sequence Gen forum.hibernate.orgorg.springframework.orm.hibernate.HibernateSystemException: this id generator generates long, integer, short; nested exception is net.sf.hibernate.id.IdentifierGenerationException: this id generator generates long, integer, shortorg.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:333) org.springframework.orm.hibernate.HibernateSystemException: this id generator generates long, integer, short; nested exception is net.sf.hibernate.id.IdentifierGenerationException: this id generator generates long, integer, short net.sf.hibernate.id.IdentifierGenerationException: this id generator generates long, integer, short at net.sf.hibernate.id.IdentifierGeneratorFactory.get(IdentifierGeneratorFactory.java:38) at net.sf.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:73) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:765) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738) at org.springframework.orm.hibernate.HibernateTemplate$8.doInHibernate(HibernateTemplate.java:242) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:150) at org.springframework.orm.hibernate.HibernateTemplate.save(HibernateTemplate.java:240) at ... |
47. How to UnitTest when dealing with sequence ID forum.hibernate.org |
48. error relation hibernate_sequence not found?? forum.hibernate.org |
49. Primary key sequence generator forum.hibernate.orgHibernate version: hibernate-2.1 Mapping documents: |
50. sequence generator - How can I set the starting value forum.hibernate.orgI actually found the solution. It may break compatibility with other db's that use the "sequence" generator but here is all I had to do. Original: /** * @hibernate.id * column = "specialty_id" * generator-class = "sequence" * unsaved-value = "-999" * @hibernate.generator-param * name="sequence" * value="specialty_id_seq" */ /** * @hibernate.id * column = "specialty_id" * generator-class = "sequence" * unsaved-value ... |
51. Generating a db sequence number for other-than-primary keys forum.hibernate.orgHi, I have a requirement that a non-key column of a table be updated with a brand-new number when certain types of updates happen for a row. What I want to do (in a portable manner) is to get the next sequence number from some sequence generator and assign the specific property of the persistent object to that value. As far ... |
52. sequence generator implementation forum.hibernate.orgHi, I have a clustered application using JBoss/Hibernate. I have 11 tables, each of which needs a sequence generator. I thought of implementing a sequence table with schema: Code: companyId : bigint tableName : varchar maxId : bigint then, when a new id is needed, perform a select to get the current maxId, increment & update (within a single transaction). I ... |
53. Hibernate and DB2's version changes with collating sequence forum.hibernate.orgHibernate version: 2.1.6 Name and version of the database you are using:Currently v7.10. DB2 v8 is about 1 year away. Question: Using Criteria based queries, what is the best way to handle, at an application level, the shifting collating sequence in DB2 as it varies between versions? I have developed an application that will select based on alphanumeric ranges and values ... |
54. sequence support for hsqldb? forum.hibernate.orgException in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session-factory' defined in file [E:\java\main-context.xml]: Initialization of bean failed; nested exception is net.sf.hibernate.MappingException: could not instantiate id generator net.sf.hibernate.MappingException: could not instantiate id generator at net.sf.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:82) at net.sf.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:82) at net.sf.hibernate.persister.AbstractEntityPersister. |
55. Can use JDBC3 generated keys with Oracle sequences? forum.hibernate.org |
56. getting nextVal from a sequence forum.hibernate.org |
57. assigned primary key with the sequence generator forum.hibernate.orgI am using the sequence generator class. I need to import data from an old database, during a migration phase, and I need to keep the primary keys the same on some tables. I would like to not have to change the mappings from generator class="sequence" to generator class="assigned" to perform the migration. I have tried setting the primary key column ... |
58. Duplicate key error when using sequence generator forum.hibernate.org |
59. how to get nextval from a sequence forum.hibernate.orgConnection conn = sess.connection(); Statement stmt = conn.createStatement(); ResultSet res = stmt.executeQuery("select genid_seq_standard.nextval ... |
60. |
61. Insert sequence reversely forum.hibernate.orgHi all I met a strange question. I have two tables poheader and poitem. Relationship is one-to-many. I have maintained bidirectional relationship and do save them to my mysql database. Insert is OK. But when I open the database, I found the insert sequence is reverse. For example, there are two items 10 and 20, I want hibernate do insert 10 ... |
62. oracle problem with native id generator, HIBERNATE_SEQUENCE forum.hibernate.orgHibernate version: 2.1.6 I use the native id generator and have seen that for Oracle one sequence is used for all tables. Since I initialize the database with some default data, this leads to errors because the seuqence starts at 1 by default. I solve this by setting the sequence to my highest id in my initial data. I'm regaled by ... |
63. (beginner) Using id from another, sequence table forum.hibernate.org |
64. Avoid multiple DB Calls during sequence generation forum.hibernate.orgHi, I'm using the Oracle sequence generation to insert a new row into my detail tables. I noticed that Hibernate generates 2 calls to the db for each insert.. 1. To generate sequence.nextval 2. The actual insert Is there any way that I could reduce this to just one call, and still continue using sequences? We have a home-grown persistence layer ... |
65. Hibernate3 and sequences forum.hibernate.orgI checked out and built Hibernate3 source. I am trying to use it with PostgreSQL 7.4.1. Every time I try to use seqhilo or native or sequence generator, I get the following error: Caused by: org.hibernate.MappingException: Dialect does not support sequences at org.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:366) It seems that this method just has one line, which throws an Exception. Should I create a JIRA ... |
66. Help!hilo can't generate id?! fetch out of sequence?!! forum.hibernate.orgSenior Joined: Wed Dec 17, 2003 4:24 am Posts: 188 2.1.6 |
67. sequence and lists forum.hibernate.orgPage 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message number Post subject: sequence and lists Posted: Fri Jan 07, 2005 4:33 am Newbie Joined: Fri Jan 07, 2005 3:46 am Posts: 2 My situation: I have several unidirectional parent-child associations in my application. They are ... |
68. Problem using scalar queries on sequence forum.hibernate.org |
69. Hibernate and Oracle sequence forum.hibernate.orgHi all, i was working with a MySQL Server, and finally we have to use Oracle 9i. After some searches on google, i noticed Oracle doesn't support the 'auto_increment' of MySQL. Instead of that, i need to use sequence ? Who know how using Oracle sequence with Hibernate ? Do i have to create trigger for generating the number on my ... |
70. Oracle sequence forum.hibernate.org |
71. Mapping oracle sequence to id field forum.hibernate.org |
72. How do I override a sequence generator? forum.hibernate.orgTransaction trans = session.beginTransaction(); Checkdomain cfd = new Checkdomain(); cfd.setComment("My new Checkformat"); cfd.setMaxvalue(10); cfd.setMinvalue(2); Integer id = (Integer) session.save(cfd); // Now the user decides to change the data to Checkmaxlength. // Maybe even later in a different transaction. CheckmaxLength cml = new Checkmaxlength(); cml.setId(id); cml.setComment(cfd.getComment()); cml.setMaxlength(100); // Since both objects are subclass of Checkformat, we have to delete // the old ... |
73. oracle sequence and hibernate 2.1 forum.hibernate.orgWhen I attempt to run my unit test im getting the following error DEBUG - BatcherImpl.log(229) | select hibernate_sequence.nextval from dual DEBUG - BatcherImpl.getPreparedStatement(252) | preparing statement DEBUG - JDBCExceptionReporter.logExceptions(49) | SQL Exception java.sql.SQLException: ORA-02289: sequence does not exist How do I not use the default sequence (hibernate_sequence). In my mapping files I have the following, so it should be working ... |
74. unique constraint while adding records through sequence forum.hibernate.orgAuthor Message rascaly2k Post subject: unique constraint while adding records through sequence Posted: Wed Feb 23, 2005 10:54 am Beginner Joined: Wed Feb 23, 2005 10:26 am Posts: 22 Read the rules before posting! http://www.hibernate.org/ForumMailingli ... AskForHelp Hi what I am trying to do is simple. I am trying to just add records into the db. I have a ... |
75. Using a sequence without a table forum.hibernate.orgIn a web application I want to use a sequence in the DB to generate unique, incrementing ids I need for an external interface. Can I do it without using native SQL (in Hibernate 2.1)? The closest I found was: Dialect.getSequenceNextValString ( "my_sequnce_name" ) But I found no way to find out the Dialect of the running session. Actually I need ... |
76. ClassCastException when commiting-Ora Sequence,BigDecimal ID forum.hibernate.orgAuctionUser.hbm.xml: |
77. mapping property to sequence forum.hibernate.orgHi I would be interested to know how you solved this issue since I am facing the same issue of mapping a non primary key (or part of composite key) i.e. a property to a sequence in Oracle. The sequence is there to preserve an order for enrties made. One way to do it would be to make a Usertype for ... |
78. SAP DB with sequence generator working ok ? forum.hibernate.orgHello, anyone got any ideeas why i am not able to save a record in a sapDB database when using sequence? what other generators work for SAP ? I am encountering the following error when tring to save an object to the database: [code] org.hibernate.event.AbstractSaveEventListener - saving [ro.citrusmedia.lims.web.webclients.WebClientInfo#1] ERROR 2005-03-28 02:10:43,591 org.hibernate.property.BasicPropertyAccessor - IllegalArgumentException in class: ro.citrusmedia.lims.web.webclients.WebClientInfo, setter method of property: ... |
79. unable to insert record into maxdb. Failing at sequence gen forum.hibernate.orgI am trying to insert into a table with two columns: one the primary key ( an int ) and a description field. It looks like there is some problem( of course with my configuration ) with the sequence generation. I tried identity, native and sequence. Well, identity failed for obvious reasons. but could not find the failure reason for native. ... |
80. CLI0125E Function sequence error. SQLSTATE=HY010 forum.hibernate.orgI am using Hibernate 2.1.7. Webspphere 5.0.2.6. Db2 V 08.01.0000 DB2 JDBC Driver 08.01.0000 I have made sue the db2java.zip is the same on the client and the server. It gives me the following error: [4/4/05 14:11:05:441 PDT] 66f107ca SystemOut O Hibernate: select aclentryim0_.C_ID as C_ID0_, aclentryim0_.C_ENTRYID as C_ENTRYID0_, aclentryim0_.C_ACTION as C_ACTION0_, aclentryim0_.C_PRINCIPAL as C_PRINCI4_0_, aclentryim0_.C_PRINCIPALTYPE as C_PRINCI5_0_, aclentryim0_.C_PERMISSION as C_PERMIS6_0_, ... |
81. Hibernate can't get the sequence number forum.hibernate.orgI'm trying to get a sequence number generated for a column before inserting the values in the table. I use select nextval('sequence_name') and use this query to read the result into a result set but I get a "relation "sequence_name" does not exist" error. I'm using postgres 8.1. Any ideas how I can get around this? Thanks. |
82. Problem while fetching values from oracle sequences forum.hibernate.org |
83. Use sequence generator with Oracle 9 forum.hibernate.orgHi all, I'm using Hibernate 3.0, I want to use the sequence generator with Oracle 9. But in the specification and Hibernate in Action I couldn't find an example how to mapping the generator with the name of the sequence I have defined in Oracle. I suppose this is trivial when you have done the first time, but until that moment... ... |
84. mapping generation for oracle sequence forum.hibernate.org |
85. Unable to generate a sequence number with Oracle Database forum.hibernate.orgHi, I am using hibernate 2.1 have created a mapping and so on and have managed to retrieve some data from a table using hibernate succesfully. I am now trying to create a record in the database. In my mapping file for the table I have defined as follows: Code: |
86. Sequence Generated Custom ID Class forum.hibernate.orgHibernate version:2 Is it possible to create a custom ID class with a sequence generator. I would like to use a sequence to generate long (number) ids but I want the result to be stored in my own custom ID class not the standard java Long class. The Hibernate mapping would look something like this |
87. native sql inserts with sequence number forum.hibernate.orgHi, I want to define my own sql-insert for some classes, in order to use id sequence generator for attributes that are not PKs. How can I do that? My first try was this: |
88. How to generate a String primary key using sequence? forum.hibernate.orgMy simple table has a primary key of type String. I would like to use a sequence in oracle, concatenate a String in front, and use the result as the primary key. The result would be an id of the form CONXXXX where XXXX is the result of the sequence. Can someone explain how this would be done? |
89. upon saving childs generator sequence isn't called forum.hibernate.orgHi all simple inheritance, but the child class doesn't get it's sequence called. Upon show_sql=true i see that hibernate selects the nextval for the parentclass (the one that is saved) but never the nextval for the child class. mapping: class A: |
90. save probem Child's sequence not called forum.hibernate.orgIn my structure the sequence for my childobjects isn't called. I debugged hibernate and effectivly it doesn't do the select nextval from A_sequence I'm using postgres and these mappings class A: |
91. Weird number --- oracle sequence + Hibernate forum.hibernate.orgHi, All Regarding the above question, I got some new interesting findings. When I run the following code, I got the problem: --------------- NetworkService newns = new NetworkService(); newns.setExternalReferenceNo("testrefenece"); newns.setServiceNo("99999999"); newns.setServiceStartDate(new Timestamp(new Date().getTime())); newns.setServiceEndDate(null); newns.setServiceType(1); newns.setStatus(1); newns.setStatusStartDatetime(new Timestamp(new Date().getTime())); newns.setTransactionID(1111111); newns.setLastUpdatedDatetime(new Date()); session.save(newns); ------------------------------------------ The inserted record's primary key (generated by sequence) is "-3.7E-7" But if I set the LastUpdateDateTime to ... |
92. hibernate_sequence forum.hibernate.org ... |
93. Intializing sequences forum.hibernate.orgI'd like to use a sequence generator with oracle. Problem is that I insert some data with DBUnit in order to pre-populate the database. These inserts don't use the sequences. So, I'd like to be able to tell Hibernate to use a sequence that starts at a certain number, e.g., 50. Any way to do this? |
94. ? to generate a sequence in hibernate in DB2 4 a compositeID forum.hibernate.orghi, can anyone help me out for generating sequence for one of the keys of a composite id.. ex: |
95. Sequence conflicts when saving many-to-many |
96. Mapping foreign key from 2 tables using same Oracle sequence forum.hibernate.org |
97. Session to early closed (flushed?) after sequence selection forum.hibernate.orgHi, I often encounter problems which are due to a premature close of the session - however, this is automatically done by Hibernate and leads to Transaction errors! I use the SessionUtil of the CaveatEmptor (SE). In my case, I try to insert an object: Code: SessionUtil.beginTransaction(); Session session ... |
98. Accessing the identifier sequence forum.hibernate.org |
99. How to generate custom Id using the sequence. eg: S121 forum.hibernate.orgI don't think you can do that. If you want the database to generate the id, well, the database generates it and you have no control over it. Also, a sequence is a number. By putting a letter in front of it you change its type. Maybe oracle let you tweak id generation, maybe you could perform the necessary select to ... |
100. Read sequence value and runtime dialect detection. forum.hibernate.org |