I have an Entity named address. The address Entity has several fields, one of which is CITY. I\'ve created a query by calling entityManager.createQuery but my query only inc
There is a way to do this, but it involves some duplication of code. You'll have to create a new entity called "AddressWithCityOnly" containing just the ID and the CITY attributes and point it to the same table in the db (address table).
Then you can use this new entity to do partial load of the Address entity (loading these entities will only load the CITY field) and partial update (will update only the CITY field) to the address table.
I am facing a similar issue. I have a PERSON table with about 70 columns and about 100,000 rows, and I want to update just one column of all of the rows. Loading the original entity would retrieve all 70 columns which is too much overhead.