RE: [Hibernate] New Wiki style

2003-02-18 Thread Raible, Matt
I agree - looks great Christian! Matt > -Original Message- > From: Max Rydahl Andersen [mailto:[EMAIL PROTECTED] > Sent: Sunday, February 16, 2003 5:54 AM > To: [EMAIL PROTECTED] > Subject: Re: [Hibernate] New Wiki style > > > Looks nice :) > > /max > > - Original Message - >

RE: [Hibernate] Error: cannot modify a column which maps to a non key-preserved t able [solved]

2003-02-07 Thread Raible, Matt
(before doFilter) and it fixed the problem. Thanks for listening, Matt > -----Original Message- > From: Raible, Matt > Sent: Thursday, February 06, 2003 3:52 PM > To: '[EMAIL PROTECTED]' > Subject: RE: [Hibernate] Error: cannot modify a column which maps to a >

RE: [Hibernate] Error: cannot modify a column which maps to a non key-preserved t able

2003-02-07 Thread Raible, Matt
13Processor[11009][4]] JDBCExceptionReporter.logExceptions(42) | ORA-01779: cannot modify a column which maps to a non key-preserved table Thanks, Matt > -Original Message----- > From: Raible, Matt > Sent: Thursday, February 06, 2003 3:39 PM > To: '[EMAIL PROTECTED]' > Subject: [H

[Hibernate] Error: cannot modify a column which maps to a non key-preserved t able

2003-02-06 Thread Raible, Matt
I'm getting the following error when I login -> ActionFilter gets user's information -> UserAction class gets more information: 2003-02-06 15:29:43,312 ERROR cirrus.hibernate.helpers.JDBCExceptionReporter - ORA-01779: cannot modify a column which maps to a non key-preserved table If I login ->

RE: [Hibernate] Hibernate.cfg.xml without JNDI

2003-02-05 Thread Raible, Matt
> my connections, so this isn't a problem for me either. I > would, however, > like to eventually move to an app server provided datasource. I wonder > how I will run my tests then...? > > Joe > > > -Original Message- > > From: [EMAIL PROTECTED] >

RE: [Hibernate] Hibernate.cfg.xml without JNDI

2003-02-05 Thread Raible, Matt
I get it - I guess I'll just keep with my old JNDI-for-web/Datastore-for-tests method then. Thanks, Matt > -Original Message- > From: Jason Carreira [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 05, 2003 1:40 PM > To: Raible, Matt; [EMAIL PROTECTED] > Sub

RE: [Hibernate] Hibernate.cfg.xml without JNDI

2003-02-05 Thread Raible, Matt
I tried using this, but I'm getting the following exception: [junit] DEBUG [main] ServiceLocator.(44) | Looking up Session in JNDI [junit] INFO [main] ServiceLocator.(49) | error communicating with JNDI, assuming testcase [junit] FATAL [main] DatasourceConnectionProvider.configure(44)

RE: [Hibernate] Parent / Child Mapping with composite-id

2003-02-05 Thread Raible, Matt
I tried you suggestion, in the following composite-id form: And now I get: [junit] org.appfuse.persistence.DAOException: cirrus.hibernate.MappingException: An association refers to an unmapped class: java.lang.Long So I thought, "hmmm, maybe the

[Hibernate] New Parent / Child Documentation

2003-02-04 Thread Raible, Matt
Has the syntax for specifying one-to-many changed for 2.0... I'm trying to work through the new documentation and get my parent - composite-id child working, and noticed the following that doesn't work with 1.2.x: For 1.2.x, it should be: Thanks, Matt ---

RE: [Hibernate] Obtaining session in a filter

2003-01-30 Thread Raible, Matt
I added some debug parameters, and you're right that the lookup happens each time. It sounds to me like the HibernateSession class could be enhanced to allow only one lookup. Here is a first stab at it: public class HibernateSession { //~ Static fields/initializers ==

RE: [Hibernate] Obtaining session in a filter

2003-01-30 Thread Raible, Matt
ct: RE: [Hibernate] Obtaining session in a filter > > > > From: Raible, Matt [mailto:[EMAIL PROTECTED] > > > > BTW - your filter complains about setting a static variable > > from a non-static context: this.factory = > > (SessionFactory)ctx.lookup(facto

[Hibernate] RE: [Hibernate] "Communication link failure: java.io.IOException"

2003-01-30 Thread Raible, Matt
You can remedy this problem with MySQL by adding autoReconnect=true in your JDBC URL. For instance: jdbc:mysql://localhost/mydatabase?autoReconnect=true I've also heard that adding a validationQuery parameter will have a similar effect (at least with Oracle): validationQuer

RE: [Hibernate] Obtaining session in a filter

2003-01-29 Thread Raible, Matt
[EMAIL PROTECTED] > Subject: RE: [Hibernate] Obtaining session in a filter > > > I just added my filter to the Wiki; I recommend using that :-) > > http://hibernate.bluemars.net/43.html > > Jeff Schnitzer > [EMAIL PROTECTED] > > > -Original Message--

[Hibernate] Obtaining session in a filter

2003-01-29 Thread Raible, Matt
I'm trying to migrate my app to use a Session at the UI level, and to pass this session down to my services and persistence layers. In my Filter, I'm basically calling a HibernateSession class which looks like the ThreadLocal pattern from the design patterns on the wiki. Below is my doFilter meth

[Hibernate] composite-id still doesn't work for me...

2003-01-22 Thread Raible, Matt
I just did a fresh checkout from CVS and updated my hibernate version. I can still retrieve data (and children) just fine, but not save it. I noticed now that 's "unsaved-value" only allows "any" and "none" - however, neither of these work for me: res

[Hibernate] composite-id patch

2003-01-22 Thread Raible, Matt
Gavin, Can you send me a hint on how to patch the composite-id bug myself? Thanks, Matt --- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on trai

RE: [Hibernate] Saving Children with composite-id

2003-01-21 Thread Raible, Matt
Is it possible that saveOrUpdate will not work for the children of this object, and I have to use update(obj, id) instead? Damn, I thought hibernate was easy and now it's kicking my ass! It's probably something super simple and I'm just not seeing it. To re-iterate (I know you guys hate me by no

RE: [Hibernate] Saving Children with composite-id

2003-01-21 Thread Raible, Matt
D_NUM ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) I'll try downloading 1.2.2 and see if that helps. Matt > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, January 20, 2003 6:04 PM > To: Raible, Matt > Cc: '[EMAIL PROTECTED]'

RE: [Hibernate] Saving Children with composite-id

2003-01-21 Thread Raible, Matt
hould do an insert or an update? By the equals method in my CompositeId? Thanks, Matt > -Original Message- > From: Raible, Matt > Sent: Monday, January 20, 2003 4:43 PM > To: '[EMAIL PROTECTED]' > Subject: RE: [Hibernate] Saving Children with composite-id >

RE: [Hibernate] Saving Children with composite-id

2003-01-21 Thread Raible, Matt
ideas? If this is *supposed* to work, then maybe there's a 3rd primary key on the CMCF_MPS table I'm not aware of. Thanks, Matt > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, January 20, 2003 4:14 PM > To: Raible, Matt

[Hibernate] Saving Children with composite-id

2003-01-20 Thread Raible, Matt
I have a composite-id element in a child object: The CCRRecordPK class has two properties, ccrId and recordNum, both are java.lang.Long. In it's parent, I want to correctly map to this child, but I can't seem to figure out the mapping - and couldn't fi

[Hibernate] RE: Saving an object with children is not working

2003-01-17 Thread Raible, Matt
Just a thought - could this be fixed by creating a composite-id class for my child objects? I haven't done that yet, I'm still using: Thanks, Matt -Original Message----- From: Raible, Matt Sent: Thursday, January 16, 2003 4:34 PM T

[Hibernate] Saving an object with children is not working

2003-01-17 Thread Raible, Matt
(grumbles after sending blank e-mail ... damn outlook) I am getting and saving an object (with children) using the following testscase: public void testSaveCMCFMaster() throws Exception { CMCFMaster c = dao.getCMCFMaster(new Long(105)); assertTrue(c != null);

[Hibernate] Saving an object with children is not working

2003-01-17 Thread Raible, Matt
I am getting and saving an object (with children) using the following testscase: --- This SF.NET email is sponsored by: Thawte.com Understand how to protect your customers personal information by implementing SSL on your Apache Web Server. Clic

RE: [Hibernate] List -> ArrayList

2003-01-16 Thread Raible, Matt
January 12, 2003 1:49 AM To: Raible, Matt; [EMAIL PROTECTED] Subject: Re: [Hibernate] List -> ArrayList try this : public Object convert(Class type, Object value) { if (log.isDebugEnabled()) { log.debug("entering 'convert' method"); } // for a null

[Hibernate] RE: Query only brings back first record

2003-01-14 Thread Raible, Matt
I'm guessing this might be b/c I have a single primary key defined in my mapping file, and there are actually multiple records in this table with that primary key. Thanks, Matt -Original Message- From: Raible, Matt Sent: Tuesday, January 14, 2003 12:33 PM To: '[EMAIL

[Hibernate] Query only brings back first record

2003-01-14 Thread Raible, Matt
I have the following hibernate code that queries a table and brings back rows. Hibernate brings back the proper number of rows (3), but each object (row) is identical - the first one. StringBuffer query = new StringBuffer(); query.append("from cr in class com.comcast.cable.dmc.itd

[Hibernate] Error: Foreign key must have same number of columns as referenced primary key

2003-01-14 Thread Raible, Matt
I have a mapping with the following child (bag) declared in the hbm.xml file: This works fine, but the true primary key is two columns: But when I try with the

[Hibernate] Mapping children and filtering

2003-01-13 Thread Raible, Matt
Is it possible to add some sort of filtering to the following mapping? --- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers

[Hibernate] Mapping children and filtering

2003-01-13 Thread Raible, Matt
Is it possible to add some sort of filtering to the following mapping? It's be great to do something like add a where clause to this mapping. I briefly looked through the docs, but didn't see anything. Thanks, Matt

RE: [Hibernate] List -> ArrayList

2003-01-13 Thread Raible, Matt
Beautiful - worked like a charm! You've made my day ;-) Matt -Original Message- From: Juozas Baliuka [mailto:[EMAIL PROTECTED] Sent: Sunday, January 12, 2003 1:49 AM To: Raible, Matt; [EMAIL PROTECTED] Subject: Re: [Hibernate] List -> ArrayList try this : public Object

[Hibernate] duplicate class mapping

2003-01-13 Thread Raible, Matt
I am trying to use hibernate to accomodate a difficult database design. I have a table (let's call it child) that has: id parent_id signal_id name signal_name signal_action There is a parent table, and I have a Parent object for that table. To help me display all of this information on the UI,

RE: [Hibernate] List -> ArrayList

2003-01-12 Thread Raible, Matt
tingMethodAccessorImpl .java :25) -Original Message- From: Viktor Szathmary [mailto:[EMAIL PROTECTED] Sent: Saturday, January 11, 2003 3:36 PM To: Raible, Matt; [EMAIL PROTECTED] Subject: Re: [Hibernate] List -> ArrayList hi, On Sat, 11 Jan 2003 14:34:36 -0700, "Raible, Matt&q

[Hibernate] List -> ArrayList

2003-01-11 Thread Raible, Matt
I have a List in my User object that I want to convert to an ArrayList on my UserForm using BeanUtils.copyProperties. I can register a customer converter, but I need to translate cirrus.hibernate.collections.Bag into an ArrayList. I can't seem to find an Javadocs on this class - any ideas or sugg

[Hibernate] Codegenerator of the future?

2003-01-09 Thread Raible, Matt
Will the Codegenerator of the future (http://hibernate.bluemars.net/52.html#17) replace the current ReverseGenerator? What I mean is that I have used the ReverseGenerator to create a TableName.java class and it's accompanying TableName.hbm.xml. This works great and I applaud you all on making thi

[Hibernate] Is it possible to generate hibernate.cfg.xml?

2003-01-08 Thread Raible, Matt
I am using a hibernate.properties file, as well as a hibernate.cfg.xml. The hibernate.properties file is used for running JUnit tests, and the hibernate.cfg.xml is used for running Hibernate in Tomcat. (Note: it chokes when both files are deployed). I'm wondering if there is a way to "generate"

[Hibernate] mail-archive.com

2003-01-08 Thread Raible, Matt
Are there any plans for getting a better (searchable) archive for this mailing list? I really like the one at mail-archive - I know the XDoclet team uses it. Matt --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM +

[Hibernate] Calling Prepared Statements

2003-01-07 Thread Raible, Matt
I'm guessing the best way to call prepared statements is with JDBC, rather than Hibernate. Correct? Thanks, Matt --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftwar

RE: [Hibernate] Getting a sorted list of results

2003-01-04 Thread Raible, Matt
ay to do it. Thanks, Matt -Original Message- From: Raible, Matt Sent: Friday, January 03, 2003 1:07 PM To: '[EMAIL PROTECTED]' Subject: RE: [Hibernate] Getting a sorted list of results And so it begins - I eliminated about 100 lines of code by passing in a List

RE: [Hibernate] Getting a sorted list of results

2003-01-03 Thread Raible, Matt
And so it begins - I eliminated about 100 lines of code by passing in a List of longs, vs. a List of objects with their id's set. Thank you from the bottom of my heart ;) Matt - Forwarded message - > This *looks* to be exactly what I'm looking for, however, I'm getting an

RE: [Hibernate] Getting a sorted list of results

2003-01-03 Thread Raible, Matt
t.add(h); List listWithNames = new ArrayList(headendList.size()); listWithNames = dao.getHeadendNames(headendList); Thanks, Matt -Original Message- From: Gavin King [mailto:[EMAIL PROTECTED] Sent: Thursday, January 02, 2003 7:56 PM To: Raible, Matt;

[Hibernate] Getting a sorted list of results

2003-01-03 Thread Raible, Matt
I am using the following method to get back a list of objects based on ids. What I would prefer is to get back a list of objects sorted by object.name. I know there's an easier way to do this with hibernate, but I can't seem to find it. // loop through the list of headend ids and get t

RE: [Hibernate] List only returns first row, rather than both

2003-01-03 Thread Raible, Matt
rId, Hibernate.STRING); List msoList = (List) ses.find("select distinct cct_user.msoId " + qry, userId, Hibernate.STRING); If there's a better way, please let me know as this seems like kindof a kludge. Matt -Original Message- From: Konstantin Priblouda [mailto:[EMAIL P

[Hibernate] Oracle error: exceeded simultaneous SESSIONS_PER_USER limit

2003-01-02 Thread Raible, Matt
I'm getting the following error when using Hibernate as my persistence layer: java.sql.SQLException: ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit ORA-02063: preceding line from NAS_AC_72 ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit ORA-02063: preceding line from NAS_AC_72

[Hibernate] List only returns first row, rather than both

2003-01-01 Thread Raible, Matt
I have to rows in my "user" table and I expect to get two rows of data back. However, the following query returns two items in the list, but they're the same: List users = (List) ses.find("from cct_user in class com.cable.comcast.dmc.itd.cct.persistence.User where cct_user.userId=?", userId, Hiber

[Hibernate] Combining 2 tables into 1 object

2002-12-30 Thread Raible, Matt
I have two tables that are very simple code_category - category_id category_name code_reference - code_id category_id code_desc Is it possible to combine these into one object in Hibernate? All I've read seem to indicate that these should be separate objects. Is it best

[Hibernate] Using Oracle Sequence

2002-12-30 Thread Raible, Matt
How do I convert the following Oracle query to a hiberate? select ccr_master_sq.nextval from dual; Here's a WAG: ccr_master_sq.nextval dual Is this correct? Thanks, Matt --- This sf.net email is sponsored by:Th

[Hibernate] creating a composite-id with xdoclet

2002-12-26 Thread Raible, Matt
Is it possible to create the following with xdoclet tags? I generated this from our database, and now want to map back to it using XDoclet. Thanks, Matt --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thi

RE: [Hibernate] Oracle error

2002-12-21 Thread Raible, Matt
December 20, 2002 5:57 PM To: Raible, Matt Cc: [EMAIL PROTECTED] Subject: RE: [Hibernate] Oracle error > > Here's the SQL that Hibernate is generating for me: > > [junit] Hibernate: SELECT user.user_id as user_id, > user.changed_by as changed_by, user.created_by

RE: [Hibernate] Oracle error

2002-12-21 Thread Raible, Matt
in King [mailto:[EMAIL PROTECTED] Sent: Friday, December 20, 2002 3:57 PM To: Raible, Matt Cc: [EMAIL PROTECTED] Subject: RE: [Hibernate] Oracle error Correct QL syntax is: from user in class com.cable.comcast.dmc.itd.cct.persistence.User where user.username=? :) > -Original Message