perhaps turning on show_sql with hibernate will give some more hints to the problem.
but from my own experience: I never wrote a query that would be shorter
as "from c in Company" (don't know if "from Company as c" would be the same),
and I always specify the complete package name de.janheise.domain.Company
also ("from c in de.janheise.domain.Company") because I normally don't use
the aliases.
perhaps this helps,
Jan
Am 26.01.2005 um 10:58 schrieb [EMAIL PROTECTED]:
"from Company" is enough, as documented here :
http://www.hibernate.org/hib_docs/reference/en/html_single/ #manipulatingdata-querying
Anyway, I have done another project with 3.0M3 and the same query is working.
I've tried a "select * from company" and it's the same pb.
That's why I'm submittig this problem.
Thanks for your help
Selon Max Cooper <[EMAIL PROTECTED]>:
I don't know hibernate's query language enough to be sure this is the
problem, but "from Company" seems like an incomplete query, and the
error message seems to indicate this as well. Shouldn't it be something
mor like "select * from Company"? Or replace '*' with an explicit list
of columns/attributes.
-Max
On Wed, 2005-01-26 at 10:37 +0100, [EMAIL PROTECTED] wrote:getCompanies(net.sf.hibernate.SessionHi,
I have a problem related to hibernate.
I've created a simple <<Entity>> called Company.
I've added a <<FinderMethod>> called getCompanies() that is doing a simple
@andromda.hibernate.query "from Company".
The generated code looks like that :
/** * * * Finds Company instance(s) using a query. */ public static java.util.Collectionsession)jboss
throws net.sf.hibernate.HibernateException
{
net.sf.hibernate.Query query = session.createQuery("from Company");
return query.list();
}
which looks nice. Anyway, it's a simple example.
When I call this method on a SessionBean, I have a hibernate error in my"from"logs :
10:07:25,009 INFO [STDOUT] Hibernate: select from
10:07:25,017 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 42601
10:07:25,017 ERROR [JDBCExceptionReporter] ERROR: syntax error at or near
I'v tried other hibernate operations such as load object instance, save new
object, etc which works.
Is my problem related to hibernate or to andromda? Does anybody already had this problem?
Thankx in advance ;-)
NB: using 3.0-RC1-SNAPSHOT
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user
