我试图使用@SQLDeleteHibernate 的注释进行软删除.当数据库模式是静态的时,它很有效,即:在SQL中传递它.
不幸的是,似乎SQL按原样传递给了EntityPersisters(cf EntityClass的方法,CustomSQL createCustomSQL(AnnotationInstance customSqlAnnotation)所以我无法找到一种方法来动态传递模式名称,就像在Native SQL查询中一样使用{h-schema}
了没有人为这个问题找到一个好的解决方法(我正在使用Hibernate 4.3.5)?
编辑:除非有真正的解决方案,否则org.hibernate.persister.entity.AbstractEntityPersister在方法中设置自定义SQL查询时,我最终通过替换架构占位符来修改代码源doLateInit.
Edit2:我在Hibernate JIRA中为这种行为创建了一个问题.我将在今天晚些时候创建一个拉取请求,我希望Hibernate团队能够接受它
我正在尝试在Websphere 8.5.5上部署应用程序我已经为Websphere创建了一个共享库,其中包括myfaces 2.2 jar和其他依赖项,如commons-collections.
我还将我的应用程序的类加载器作为PARENT_LAST.
部署应用程序时,我得到以下异常:
An error occured while initializing MyFaces: Class com.ibm.ws.jsf.config.annotation.WASMyFacesAnnotationProvider is no org.apache.myfaces.spi.AnnotationProvider
java.lang.IllegalArgumentException: Class com.ibm.ws.jsf.config.annotation.WASMyFacesAnnotationProvider is no org.apache.myfaces.spi.AnnotationProvider
at org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:557)
at org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:524)
Run Code Online (Sandbox Code Playgroud)