spring-data


Is it possble to write query at JPA entity property level


Is it possble to write query at JPA entity property level?
Basically I want to add a property in an entity which is not an actual column and value should computed with query.
Something like:
#Entity
#Table(schema = "quote", name = "QUOTE_SCENARIO")
public class QuoteScenario {
#Query(Select max(Lead_Time) from differentEntity)
private Integer leadTime;
}
No. This is not possible as the query annotation is at the method level. You can try and do this using formula in Hibernate.

Related Links

QueryDslPredicateExecutor: Predicate from two tables
Couchbase + Spring Data: Get only field instead of whole entity using #Query
How can I create a Predicate from a HQL query?
Left Join in Spring Data JPA's Specification
Lombok Usage - It doesn't serve its functionality in a unit test
Spring Data Couchbase findById always returns null
spring-data-neo4j repository with Camel fails to initialize
How does pages work if the DB is manipulated between next
How can I generate Q-classes with QueryDsl 4.1.4 and Spring-Data-Jpa 2.0.0.M1?
How to map a legacy database table with mismanaged attribute names
spring-data-redis: Unexpected end of stream exception
Is it possible to use OR and LIKE keyword together in Spring Data JPA
Save and find within same transaction
Why doesn't spring-data-elasticsearch use the objectmapper from the spring context
QueryDSL 4.3.1 : Generate JPA and SQL Types using Maven
How to write MongoTemplate Query and Criteria for a complex Document structure?

Categories

HOME
php
qt
python-2.7
oracle
list
automapper
keyboard
angular-ui-grid
adfs3.0
opencv-python
systemd
embedded-resource
odata
portable-class-library
linker
scheduler
tup
anchor
rangy
buffer
sslhandshakeexception
spring-jpa
jodatime
google-tasks-api
exec-maven-plugin
nullreferenceexception
opam
spring-ldap
ini
pyopencl
morris.js
hevc
php-5.3
bobo-browse.net
autodesk-model-derivative
snap-framework
seafile-server
lxml
payeezy
adminer
db2-luw
stackpanel
android-alarms
coverage.py
oracle-bmcs
asihttprequest
directwrite
spring.net
skip-lists
nslayoutconstraint
stateless-session-bean
yargs
thread-exceptions
pyaudio
nunit-console
eclemma
jemdoc
fdt
voronoi
odesk
variable-length-array
chicagoboss
sqlbase
gql
roxygen2
android-handler
relational-model
web-api
scala-swing
innerhtml
tidyr
nsmutabledata
maven-shade-plugin
image-rotation
xml-signature
window-resize
nesper
jquery-mobile-flipswitch
oracle-adf-mobile
squeezebox
property-injection
jms-serializer
mod-perl
progress-db
xsd2code
mp4parser
form-for
hints
statechart
sly-scroller
delphi-xe4
dibs
chefspec
ip-geolocation
zend-pdf
chronometer
telerik-ajax
pageheap
mmc3
asp.net-mvc-views
3des
dip
eaccelerator
cleartype
eai

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App