Cayenne with Griffon , any one?

2012-03-20 Thread atomix
I've try to make a Cayenne work in Griffon ( Grail-like framework but for Client Application)... May be you heard about it. Did anyone walk the same way, can you share your opinions about Cayenne and Griffon, is there any effort (such as an OpenSource Project) for a Cayenne Plugin in Griffon that

Re: [HELP] Problem: Cayenne - ORM and "TEMP" tables

2012-03-20 Thread atomix
@Mike , thanks a ton! Really appreciate! I take your suggestion ... the reason I didn't take it sooner because I don't want to change the structrure of the orginal tables. After some changes, they all work fine! -- View this message in context: http://cayenne.195.n3.nabble.com/HELP-Problem-Caye

[HELP] Problem: Cayenne - ORM and "TEMP" tables

2012-03-08 Thread atomix
I had a situation, not completely related to Cayenne only, may be every ORM framework... Say I had a Test, the Test has Question(s) ,a Question can be in various Test Test -n-n- Question for short. Also, in TestHasQuestion table has a property of order, and value of the Question in a specific the

Re: HOW TO : Creating a SelectQuery has Expression like this?

2012-02-09 Thread atomix
Thank so much for your help! You saved my day! I have some more question in the WebApp area, but may be is should be in another Topic. Again, THANK ! And wish you the best ! -- View this message in context: http://cayenne.195.n3.nabble.com/HOW-TO-Creating-a-SelectQuery-has-Expression-like-thi

Re: HOW TO : Creating a SelectQuery has Expression like this?

2012-02-09 Thread atomix
Expression qual = ExpressionFactory.matchExp("toTestresult", aTestresult); //qual.andExp(Expression.fromString("getToAnswer.status = status")); //qual.andExp(Expression.fromString("status = 1")); query.andQualifier(Expression.fromString("toAnswer.status = status")); query.andQuali

Re: HOW TO : Creating a SelectQuery has Expression like this?

2012-02-09 Thread atomix
GENERATED QUERY : INFO - QueryLogger- SELECT t0.idTestResultAnswer, t0.status, t0.value, t0.idAnswer, t0.idTestResult FROM testresultanswer t0 WHERE t0.idTestResult = ? [bind: 1->idTestResult:9] INFO - QueryLogger- === returned 4 rows. - took 0 ms. return 4;

Re: HOW TO : Creating a SelectQuery has Expression like this?

2012-02-09 Thread atomix
I don't have the orginal source code here but here is a similar code : Testresultanswer is the result of an Answer which User fill; Testresultanswer has RelationShip toAnswer Testresult has (some) Testresultanswer Testresultanswer has RelationShip toTestresult Answer.status = 1 (correct Answer)

Re: HOW TO : Creating a SelectQuery has Expression like this?

2012-02-09 Thread atomix
Yes, they have 1-n relationship "toOldBook", I tested "book.hit = toOldBook.hit" (Wrong) "Book.hit = toOldBook.hit" (Wrong) "hit = toOldBook.hit" (Wrong) but "toOldBook.hit = 1" ( Correct) weird "toOldHell = 1" (nothing name to oldHell of course) the query still run without any exception???

Re: How can I get the description of a table field, or field from CayenneObject

2012-02-09 Thread atomix
Thank a lot Aristedes and Andrus You both point me very good directions which I don't know before. Cheer, this should really be written somewhere in the documentation! @Aristedes : Now assume we can use cgen Template to generate some other Class to suite our need (Japser intergration), are you an

HOW TO : Creating a SelectQuery has Expression like this?

2012-02-09 Thread atomix
I have another question regarding Expression in Cayenne : I want my generated SQL like so : *SELECT ** *FROM *Book B1 *JOIN *OldBook B2 *ON *B1.id= B2.id *WHERE *B1.hit = B2.hit so I used Expression.fromString("Book.hit = OldBook.hit"); ... but it's not affect anything to the generated SQL, e

How can I get the description of a table field, or field from CayenneObject

2012-02-09 Thread atomix
Hi all, I was quite new with Cayenne, how can I do this : Book extends _Book public static final String DESCRIPTION_PROPERTY = "description"; public static final String ID_BOOK_PROPERTY = "idBook"; public static final String LEVEL_PROPERTY = "level"; public static final String PAT