From: Dylan E. <de...@cs...> - 2004-03-12 08:03:55
|
Hi Brice, Because we are using Hibernate we are not actually generating any SQL ourselves. We do have a few places where we generate hibernate object queries but this should not break your DB. If Coefficient is trying to create tables that contain columns that are keywords then the place to fix this is in our hibernate data objects. We are using xdoclet to generate the hibernate hbm.xml files and therefore the source of the data objects contains metadata that can specify a column name for a given bean property. In Coefficient we have been fairly inconsistent about specifying these column names, by default it will make it the name of the getter/setter field. As an example: If your db has a keyword 'description' and our za.org.coefficient.core.Project object has a description field then hibernate will try to create a column in this table called description. This is where the problems may arise. This same kind of problem can come up in a hibernate query. As an example: HibernateUtil.find("from " + CoefficientUser.class.getName() + " as pe_users where pe_users.userName = ?", userName, Hibernate.STRING) In the above code if your db had 'pe_users' as a keyword this query would freak out on your db. In fact the reason we are using pe_users is because postgres has the keyword 'users'. So what this means is that you will need to look at your exceptions and see who is the offencive object in Coefficient or which is the offencive query and change that keyword. It may also be easy if you see what keyword is being violated to just grep through the src and see where it exits. I hope this helps and if you do make a change and get it working please submit what you have and we will add MaxDB to the list of tested db's. Dylan Etkin -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. |