• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using hibernate formula

 
dmitry dvoinov
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can i invoke in mapping property "formula" any oracle functions?

for example:

<property name="numberField" type="long" column="NUMBER_FIELD"/>
<property name="someField" type="long" formula="FUNC_PACKAGE.CALCULATE(NUMBER_FIELD)"/>

does this code correct and will work?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should work as long as your dialect is set to Oracle. Basically what Hibernate does when it sees test it doesn't understand how to parse in a Query, it just sends it down verbatim with the query, so if that function exists on the database then it should be called.

Try it out, is the best answer to give you too.

Mark
 
dennis zined
Ranch Hand
Posts: 330
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yep it should, i've tried it inside a formula. but as Mark pointed out, you should have the dialect set.
[ September 06, 2007: Message edited by: dennis zined ]
 
dmitry dvoinov
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks to all for replies!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic