Can you get a list of tables in your database? There should be a table called
xwikicustom_xwiki_employee

Did you run the test command from the sql console?
SELECT * FROM xwikicustom_xwiki_employee;


Caleb James DeLisle


farouk korteby wrote:
> *Hi,*
> *
> *
> *I try to implement this tutorial : *
> http://dev.xwiki.org/xwiki/bin/view/Drafts/DynamicCustomMapping*
> 
> *
> *But when i try to execute this query *
> 
> {{groovy}}
> xc = xcontext.getContext();
> for(String name : xc.getWiki().search("SELECT e.familyName from Employee e",xc
> ));
>     println(name);
> }
> {{/groovy}}
> 
> 
> *i get this exception :*
> Caused by: com.xpn.xwiki.XWikiException: Error number 3223 in 3: Exception
> while searching documents with sql SELECT familyName from Employee
> Wrapped Exception: Employee is not mapped [SELECT familyName from Employee]
> at
> com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:2142)
> at
> com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:2072)
> at
> com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:2061)
> at com.xpn.xwiki.store.XWikiCacheStore.search(XWikiCacheStore.java:581)
> at com.xpn.xwiki.XWiki.search(XWiki.java:1569)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
> at
> org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
> at
> org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
> ... 100 more
> 
> *Any ideas ?*
> 
> 

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to