cost 196 ms
grails4 遷移 Traits 延遲加載問題 - HHH000142:字節碼增強失敗

[英]grails4 migration Traits lazy load issue - HHH000142: Bytecode enhancement failed

我已將我的應用程序從 Grails-3.x 遷移到 Grails-4.1.1 我的大多數域類都實現了以下特征 class (DynamicProperties),出於某種原因它具有 GormEntity 的實現 - 以覆蓋 propertyMissing 方法。 上面的特征已經被許多像這樣的領域類實 ...

Grails 域 class 不在一對多映射類中添加集合對象 Grails 5.1.7

[英]Grails domain class does not add collection objects in one to many mapped classes Grails 5.1.7

我在一個課程創建者網站上工作,其中一個track可以有多個courses ,而它們又可以有多個assignments 域類定義如下。 和 和 而最終目標是建立多對多關系。 bootstrap.groovy 文件具有以下代碼。 雖然每個域對象都被成功保存,但一對多關系沒有被持久化,因此映射表 TR ...

Grails 4 如何在自定義命令中獲取工件句柄

[英]Grails 4 how to get an handle to artifacts in custom command

我需要在 Grails 4 應用程序 ( https://docs.grails.org/4.0.11/guide/single.html#creatingCustomCommands ) 中構建自定義命令,我需要獲取一些 Grails 服務和域類的句柄我會根據需要查詢。 自定義命令框架非常簡單: ...

grails 5 應用程序中的數據庫連接失敗,創建 hibernateDatastore 時出錯

[英]DB connectivity fails in grails 5 application with error creating hibernateDatastore

我正在將應用程序升級到 grails-5。 我已將我的數據庫連接信息從自定義 DataSource.groovy 移動到 application.yml。 環境:開發:數據源:dbCreate:更新 url:jdbc:mysql://hostName:port/DbName?user=x;passw ...

如何在 Gorm 6 或 7 中引用復合 ID 以防止 IllegalArgumentException:無法找到具有給定名稱的屬性

[英]How to reference Composite ID in Gorm 6 or 7 to prevent IllegalArgumentException: Unable to locate Attribute with the the given name

我有這個與 Gorm3 一起使用的 model 但現在它運行這個異常: 一些調試讓我了解發生了什么,似乎 GORM 從 HibernateProperties 中刪除了 user 和 dataPoint 屬性,因為它們是 Composite ID 的一部分 所以我理解這個問題,但我不知道如何解決它? ...

共享相同主鍵名稱的遺留表的 Grails 域映射

[英]Grails domain mapping of legacy tables that share same primary key name

舊數據庫有兩個表,它們使用與主鍵相同的列名。 例如: 用戶: user_id 整數名字串 用戶資料: user_id 整數訪問計數整數 我想創建一個雙向的一對一關系。 IE 我希望能夠引用“user.userProfile.visitCount”或“userProfile.user.na ...

如何在 grails 視圖文件夾中隱藏 create.gsp 表單中的幾個字段?

[英]How to hide few fields from create.gsp form in grails view folder?

我想在表格的 grails create.gsp 文件中隱藏幾個字段。 我不能使用column display false約束,因為我希望該字段在索引頁表視圖中可見。 默認情況下,create.gsp 的代碼包含以下內容: 如何跳過代碼的<f:all bean = "tablename" ...

Grails 3.3 fields plugin f:display show many-to-many可以嗎

[英]Can Grails 3.3 fields plugin f:display show many-to-many

我正在使用 Grails 3.3.9,但我可以根據需要進行更改。 我想讓 Grails 字段插件在生成時管理我的 CRUD,或者至少手動更改最少。 我無法解決的問題是當我有一個多對多關系並且想要從任何一方顯示相關實例時。 一個簡單的例子:兩個域類,Company 和 Worker。 每個都有一個字符 ...

如何強制使用 GORM 數據服務而不是 GormEntityApi

[英]How can I enforce using a GORM data service instead of GormEntityApi

如何強制我的 Grails 應用程序中的所有實體持久性操作通過GORM 數據服務發生,而不是直接在我的域類(例如GormEntityApi和動態查找器中的方法)上發生? 理想情況下, GormEntityApi和動態查找器方法在我的域類中根本不可用,但我也接受一種解決方案,該解決方案通過使方法全部 ...

帶有@GrailsCompileStatic 注釋的 Grails GORM 類在靜態映射閉包表、版本、自動時間戳中顯示為未解析符號

[英]Grails GORM class with @GrailsCompileStatic annotation shows in the static mapping closure table, version, autoTimestamp as unresolved symbol

參考: https://youtrack.jetbrains.com/issue/IDEA-206196 https://youtrack.jetbrains.com/issue/IDEA-207415?_ga=2.103698112.1724644326.1581075934-247 ...

根據 grails 域中具有多列的布爾字段值使字段唯一

[英]Make field unique based on a boolean field value with multiple column in grails domain

我正在使用 grails-2.5.2 版本。 我有一個字段,我想根據兩個字段使其獨一無二。 但是如果isActive字段值為true那么它將有一行具有相同的roll 。 但如果為false則可以使用同一個roll保存多個條目。 我的課如下: 其實我想要這樣的獨特 - name(unique: [ ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM