facebook

[Closed] HQL with "not mapped" error

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #269511 Reply

    Johan Kenens
    Member

    Hi,

    My first attempt to use Hibernate and HQL editor and stuck, I followed all instructions from MyEclipse help file. Reverse engineered 1 table (gebeurtenissoorten). Configuration file, mapping file, DAO….all stuff generated perfectly, also mapping is present in configuration file. Now entering “from gebeurtenissoorten” in the HQL editor gives me:

    org.hibernate.hql.ast.QuerySyntaxException: Gebeurtenissoorten is not mapped. [from gebeurtenissoorten]

    What am I doing wrong, forgetting?
    Many thanks

    #269545 Reply

    Riyad Kalla
    Member

    The reason is because you have to use the object names in the HQL. So if your table is “gebeurtenissoorten”, a class named Gebeurtenissoorten (notice the “G”?) was generated. So your statement must read:

    
    from Gebeurtenissoorten
    
    #269686 Reply

    Johan Kenens
    Member

    Right…that is also what I thought but I tried both and it did not work. Now I left the ide, I saw a window refreshing the hibernate context when I restarted th ide and it worked. This is reproducable in 5.1.1GA. Can I force this refresh without leaving the ide?

    Thank you
    Johan

    #269694 Reply

    Riyad Kalla
    Member

    Johan,
    I’m going to file an issue about this, thakn you for bringing it to our attention.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] HQL with "not mapped" error

You must be logged in to post in the forum log in