Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
休止状態で使用している@式の代替ソリューションはありますか? たとえば、jpaで使用する必要があります。
@Formula("select count(1) from Market m where m.defaultAirportCode=airportCode") private Boolean isDefault;
注釈と 1 つのメソッドの組み合わせを使用できます
@Transient private Boolean isDefault; @PostLoad private void setDefault() { this.isDefault=this.defaultAirportCode.equals(this.airportCode); }
式を含むデータベース ビューを使用して、エンティティをビューにマップできます。