Re: [appfuse-user] SQL v.s. HQL (plz help)

2007-06-29 Thread Dale Newfield
Daniel.Rodriguez wrote: Tried the following HQL : select cat from Categoria cat left outer join cat.subcategorias sc where cat not in sc -- Weird, it works in MySQL 3.23 (the query returns 1 result) and in MySQL 5 , the query turns up empty If you want to see exactly what SQL the hql get

Re: [appfuse-user] SQL v.s. HQL (plz help)

2007-06-29 Thread Dale Newfield
Daniel.Rodriguez wrote: Forgot to mention that the DBMS is MySQL 3.23 (it is not our db, its a client db) and they won't update it because they have some old software. So no nested queries. I think practically any non-trivial HQL query that relates to collections eventually translates into a

Re: [appfuse-user] SQL v.s. HQL (plz help)

2007-06-29 Thread Daniel.Rodriguez
Dale, Forgot to mention that the DBMS is MySQL 3.23 (it is not our db, its a client db) and they won't update it because they have some old software. So no nested queries. Thanks. DNewfield wrote: > > Daniel.Rodriguez wrote: >> I have a Class called Categoria (Category) that has a List of ca

Re: [appfuse-user] SQL v.s. HQL (plz help)

2007-06-29 Thread Dale Newfield
Daniel.Rodriguez wrote: I have a Class called Categoria (Category) that has a List of categories (sub-categories). I'm trying to build a HQL query that can gives me all the Categories that are not a subcategory of another category. In SQL is dead simple : SELECT cat.id FROM Categoria ca

[appfuse-user] SQL v.s. HQL (plz help)

2007-06-29 Thread Daniel.Rodriguez
Hi guys.. Got the following problem: I have a Class called Categoria (Category) that has a List of categories (sub-categories). I'm trying to build a HQL query that can gives me all the Categories that are not a subcategory of another category. In SQL is dead simple : SELECT cat.id FROM

Re: [appfuse-user] Appfuse Core + Swing: Session is closed

2007-06-29 Thread MarcelR
Okay, I found a way of getting the SessionFactory and starting a new session at the right time. In a dao a have a property entityManagerFactory, that is set using Spring. Then in a method, e.g. a overriden getAll I first get the SessionFactory and start a new Session: org.hibernate.SessionFactor

[appfuse-user] Acegi security and with role="user"

2007-06-29 Thread PSI
Hi! I have following setup for spring security for acegi, and when my app user having role only "user", it does not work, It shows access denied? PATTERN_TYPE_APACHE_ANT /clickstreams.jsp*=admin /flushCache.*=admin

Re: [appfuse-user] Exclude specific test

2007-06-29 Thread sarat.pediredla
Michael, Thanks for this. I can successfully exclude my tests during the test phase but now they never run. I would ideally like them to run during integration-test phase. If I include an explicit include, it does not run the other tests? Michael Horwitz wrote: > > You can do this by configuri

Re: [appfuse-user] UserAction and userForm

2007-06-29 Thread nmall
OK, the method specified is "post" in the userForm.jsp thus resulting in a post message. However, my problem is that there is nothing in the user.id. Where do we expect to get it from. Thanks! nmall wrote: > > Hi, > > In UserAction (.java) class, why do we expect the httprequest to be a > po

[appfuse-user] UserAction and userForm

2007-06-29 Thread nmall
Hi, In UserAction (.java) class, why do we expect the httprequest to be a post request and not a get (see code below). I am getting a "get" request when I click on editProfile. As a result, it does not go thru' this code. Also, the hidden filed "user.id" that is set in userForm.jsp is set to not

Re: [appfuse-user] Exclude specific test

2007-06-29 Thread Michael Horwitz
You can do this by configuring the maven surefire plugin to exclude the test in the normal test cycle and then add a configuration for it to run in the integration test cycle. More details here: http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion-exclusion.html For your case

Re: [appfuse-user] Command object null

2007-06-29 Thread dusty
Sadly, I am a Webwork guy, so I can only help you in general direction rather than specific detail. So when you edit an existing record you can edit values, post to the server and debug your controller and see the command object populated with your updated values? But when you post a new object

[appfuse-user] Date field problem with struts2 basic M5

2007-06-29 Thread arvinder
I used appfuse:gen which has multiple date fields, I have M5 but the AMP plugin I used was RC1 as I had embedded object in my entity. The jsp which was created contained following snippets for date(it has all three js files for calendar): . . Form.focusFirstElement($("carrierForm

Re: [appfuse-user] AW: Using Hibernate Tools w/ appfuse

2007-06-29 Thread Daniel.Rodriguez
Thanks Tobias, it is working now. Tobias Vogel wrote: > > Hi Daniel, > > You have to add the following entries to the classpath of the > configuration: > $M2_REPO/mysql/mysql-connector-java/5.0.5/mysql-connector-java-5.0.5.jar > $M2_REPO/org/acegisecurity/acegi-security/1.0.3/acegi-security-1

[appfuse-user] RE: Many to many relationship with data

2007-06-29 Thread dusty
I see. I am not sure if there is anything that "comes with" Appfuse that models the behavior you are talking about. Appfuse can generate basic CRUD functions and there are some examples through the user management or administration pages. But for things like a web ui to manage an object's relat

Re: [appfuse-user] Sitemesh Ugly decorator "flash"

2007-06-29 Thread Daniel.Rodriguez
Dusty, I'm not using any dojo object on my app. dusty wrote: > > Do you have an tag? Are you using some of the > built in dojo objects on this page? I have seen this flash occur with an > iframe using dojo. > > -D > > Daniel.Rodriguez wrote: >> >> Some news : >> >> Just got a huuuge p

Re: [appfuse-user] Sitemesh Ugly decorator "flash"

2007-06-29 Thread Daniel.Rodriguez
tibi, actually that is the "Flash of Unstyled Content". You can find the explanation and the solution in http://www.bluerobot.com/web/css/fouc.asp here tibi-3 wrote: > > i'm not sure what a flash looks like but my site has a lot of css and > sometime the data is loaded first and displayed

Re: [appfuse-user] Appfuse Core + Swing: Session is closed

2007-06-29 Thread fadhli
You can try and look at application-resources.xml. That's if you have the appfuse2 full source. On 6/29/07, MarcelR <[EMAIL PROTECTED]> wrote: How do I get the sessionFactory within appfuse2? Because that's the property HibernateInterceptor needs Sanjiv Jivan wrote: > > So it appears you

RE: [appfuse-user] Many to many relationship with data

2007-06-29 Thread Aled Rhys Jones
Thanks for your answer Dusty. I have a table that has company data, and one that has association data (not the relationship, but associations that the company belongs to). They are linked many to many, but the relationship also stores a reference number allocated to the company by the association.

Re: [appfuse-user] Generate tables from hbm files

2007-06-29 Thread reddeagle9
Matt, Im back up and running again after 30mins of panic! I knew this existed in appfuse but just wasnt thinking clear. Good lesson learned. Cheers for appfuse, yet again its saves the day for me mraible wrote: > > What version of AppFuse are you using? For Ant, there's a schemaexport >

Re: [appfuse-user] Appfuse Core + Swing: Session is closed

2007-06-29 Thread MarcelR
How do I get the sessionFactory within appfuse2? Because that's the property HibernateInterceptor needs Sanjiv Jivan wrote: > > So it appears you just need a single JVM Swing app and not a web app. You > should be able to use Hibernate's lazy loading features. Since you're > modifying AppFu

Re: [appfuse-user] Appfuse Core + Swing: Session is closed

2007-06-29 Thread MarcelR
Okay, that looks good. I give it a try and try to use (using AOP or so). I come back when I have a working solution. Thanx! Sanjiv Jivan wrote: > > So it appears you just need a single JVM Swing app and not a web app. You > should be able to use Hibernate's lazy loading features. Since you're

Re: [appfuse-user] Appfuse Core + Swing: Session is closed

2007-06-29 Thread Sanjiv Jivan
So it appears you just need a single JVM Swing app and not a web app. You should be able to use Hibernate's lazy loading features. Since you're modifying AppFuse to no longer be a web app, you'll have to use HibernateInterceptor instead of the OpenSessionInViewFilter in order to have the container

Re: [appfuse-user] upgrade m4 to m5 maven 2.0.6 needed

2007-06-29 Thread tibi
the otherway around. for 2m5 you need 2.0.6+ or else you get the error below Matt Raible wrote: Sure, if you feel strongly about using 2.0.4 over 2.0.6+. On 6/29/07, tibi <[EMAIL PROTECTED]> wrote: should i enter a jira for the requirement of maven 2.0.6? error with 2.0.4: [INFO] Scanning fo

Re: [appfuse-user] upgrade m4 to m5

2007-06-29 Thread tibi
ok clear Matt Raible wrote: XML and properties files that I didn't think users would need to change are not included by default. On 6/26/07, tibi <[EMAIL PROTECTED]> wrote: clear. but why are some files not in main/resources? like errors.properties maybe i have time on my next appfuse proje

AW: [appfuse-user] Appfuse Core + Swing: Session is closed

2007-06-29 Thread Tobias Vogel
You have to call Hibernate.initialize() on all collections, that are lazy loaded, e.g.: Hibernate.initialize(person.getAddresses()); Hibernate.initialize(person.getPhoneNumbers()); ... Did you try that? In my application, my "getAll()" method only returns lazy initialized objects. I then over

Re: [appfuse-user] Appfuse Core + Swing: Session is closed

2007-06-29 Thread MarcelR
I tried both (everything EAGER (actually only an int and String) and Hibernate.initialize() in the constructor of a 'model' POJO). But still get "Session is closed". Isn't there a way to control the hibernate sessions and open/close them using an aspect advisor like with the transactions? mrai

Re: [appfuse-user] Appfuse Core + Swing: Session is closed

2007-06-29 Thread MarcelR
Yes, I had no problems in an Swing application where lazy loading was used in one single JVM (sun/jrockit). (That's what I want to use now as well with appfuse2.) Actually, I want to show database activity to the user and that's hard when lazy loading is used. http://www.oracle.com/technology/tec

Re: [appfuse-user] upgrade m4 to m5

2007-06-29 Thread Matt Raible
Sure, if you feel strongly about using 2.0.4 over 2.0.6+. On 6/29/07, tibi <[EMAIL PROTECTED]> wrote: should i enter a jira for the requirement of maven 2.0.6? error with 2.0.4: [INFO] Scanning for projects... [INFO]

Re: [appfuse-user] upgrade m4 to m5

2007-06-29 Thread Matt Raible
XML and properties files that I didn't think users would need to change are not included by default. On 6/26/07, tibi <[EMAIL PROTECTED]> wrote: clear. but why are some files not in main/resources? like errors.properties maybe i have time on my next appfuse project.. now i have to deliver vast

Re: [appfuse-user] upgrade m4 to m5 maven 2.0.6

2007-06-29 Thread tibi
should i enter a jira for the requirement of maven 2.0.6? error with 2.0.4: [INFO] Scanning for projects... [INFO] [INFO] Building TopNet [INFO]task-segment: [clean, package, site] [INFO] -

Re: [appfuse-user] upgrade m4 to m5

2007-06-29 Thread tibi
should i enter a jira for the requirement of maven 2.0.6? error with 2.0.4: [INFO] Scanning for projects... [INFO] [INFO] Building TopNet [INFO]task-segment: [clean, package, site] [INFO] -

Re: [appfuse-user] Generate tables from hbm files

2007-06-29 Thread reddeagle9
Think i have found it, schemaexport thanks reddeagle9 wrote: > > The other day my laptop hard drive fried. At first all was not lost > becuase i had all code backed up via remote svn so all was good. > > Got my laptop back up and running and just realised the only thing i didnt > back up was

Re: [appfuse-user] Generate tables from hbm files

2007-06-29 Thread Matt Raible
What version of AppFuse are you using? For Ant, there's a schemaexport task that allows you to do this. For Maven, there's a hibernate3-maven-plugin. Matt On 6/29/07, reddeagle9 <[EMAIL PROTECTED]> wrote: The other day my laptop hard drive fried. At first all was not lost becuase i had all cod

[appfuse-user] Generate tables from hbm files

2007-06-29 Thread reddeagle9
The other day my laptop hard drive fried. At first all was not lost becuase i had all code backed up via remote svn so all was good. Got my laptop back up and running and just realised the only thing i didnt back up was the .sql i used to generate the database tables. I work by generating the da