Hi!
I am using hibernate xml configuration and the formula tag for my purposes.
I have a regexp_like syntax in my formula:
Code:
<formula>
case
when regexp_like(substr(column1, 11),'^[[:digit:]]+$') then substr(column1,11)
else null
end
</formula>
The problem now is, that the character ':' is known as the HQL Varible Prefix, and so, the getFilterParameterValue in the SessionImpl.class is trying to parse the filterParameterName 'digit:'.
This is an Invaldi filter-parameter name format, and an exception is thrown.
Can anyone tell my how to escape this term, so that it is not parsed ?
Thanks,
Klaus
StackTrace:
Code:
Caused by: java.lang.IllegalArgumentException: Invalid filter-parameter name format
at org.hibernate.impl.SessionImpl.parseFilterParameterName(SessionImpl.java:1122)
at org.hibernate.impl.SessionImpl.getFilterParameterValue(SessionImpl.java:1082)
at org.hibernate.engine.QueryParameters.processFilters(QueryParameters.java:497)
at org.hibernate.loader.Loader.processFilters(Loader.java:1599)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1521)
at org.hibernate.loader.Loader.doQuery(Loader.java:677)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1864)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2928)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:416)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:392)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:906)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:864)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:574)
at org.hibernate.type.EntityType.resolve(EntityType.java:390)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:120)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:858)
at org.hibernate.loader.Loader.doQuery(Loader.java:733)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.loadCollection(Loader.java:1998)
at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:52)
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:63)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1755)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentMap.values(PersistentMap.java:241)