![](/img/trans.png)
[英]grails4 migration Traits lazy load issue - HHH000142: Bytecode enhancement failed
我已將我的應用程序從 Grails-3.x 遷移到 Grails-4.1.1 我的大多數域類都實現了以下特征 class (DynamicProperties),出於某種原因它具有 GormEntity 的實現 - 以覆蓋 propertyMissing 方法。 上面的特征已經被許多像這樣的領域類實 ...
[英]grails4 migration Traits lazy load issue - HHH000142: Bytecode enhancement failed
我已將我的應用程序從 Grails-3.x 遷移到 Grails-4.1.1 我的大多數域類都實現了以下特征 class (DynamicProperties),出於某種原因它具有 GormEntity 的實現 - 以覆蓋 propertyMissing 方法。 上面的特征已經被許多像這樣的領域類實 ...
[英]grails push notification from one user to another
如何從一個用戶向另一個用戶發送推送通知,例如我想運行我的應用程序,然后我用 user1 從 chrome 打開它,用 user2 從 firefox 打開它,然后從一個用戶向另一個用戶發送推送通知 ...
[英]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 how to get an handle to artifacts in custom command
我需要在 Grails 4 應用程序 ( https://docs.grails.org/4.0.11/guide/single.html#creatingCustomCommands ) 中構建自定義命令,我需要獲取一些 Grails 服務和域類的句柄我會根據需要查詢。 自定義命令框架非常簡單: ...
[英]What to do if you don't want any domain field to be displayed(int status) in DB. Grails
class 書{ } ...
[英]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 ...
[英]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 domain mapping of legacy tables that share same primary key name
舊數據庫有兩個表,它們使用與主鍵相同的列名。 例如: 用戶: user_id 整數名字串 用戶資料: user_id 整數訪問計數整數 我想創建一個雙向的一對一關系。 IE 我希望能夠引用“user.userProfile.visitCount”或“userProfile.user.na ...
[英]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" ...
[英]No signature of method: grails.orm.bootstrap.HibernateDatastoreSpringInitializer
我處於從 grails 2.2.4 升級到 grails 4.0.8 的升級過程中,但低於錯誤。 我在谷歌上搜索,發現https://github.com/grails/gorm-hibernate5/issues/225但我有 gormVersion=gorm.version=7.0.4.REL ...
[英]How to override grails implicit log variable
我有一個 grails 應用程序,我在 controller 和服務文件夾中隱式地獲得了一個日志變量。 但是,我有自己的記錄器,我想在整個應用程序中使用它。 如何覆蓋 grails 隱式日志變量? ...
[英]Can Grails 3.3 fields plugin f:display show many-to-many
我正在使用 Grails 3.3.9,但我可以根據需要進行更改。 我想讓 Grails 字段插件在生成時管理我的 CRUD,或者至少手動更改最少。 我無法解決的問題是當我有一個多對多關系並且想要從任何一方顯示相關實例時。 一個簡單的例子:兩個域類,Company 和 Worker。 每個都有一個字符 ...
[英]Steps to upgrade grails version from 3.0.x to 3.3.x
我希望將我的 grails 應用程序(3.0.17)升級到版本 3.3.11。 是否有任何步驟可以完全升級它: ...
[英]Unit Test Grails Domain Class with Multitenant
我無法對多租戶的 grails 域 class 進行單元測試。 我正進入(狀態 rg.spockframework.runtime.ConditionFailedWithExceptionError at AccountSpec.groovy:26 Caused by: org.grails.da ...
[英]How to deep clone domain object in grails 3.3.11?
我正在嘗試deep clone我的域 object。 它有大約 10 個一對一的映射,而且還有更多。 我嘗試了以下代碼段: 但是沒有找到prop.isAssociation 。 有誰知道如何檢查grails 3.3.11中的關聯。 這曾經在1.3.7版本中工作。 ...
[英]How to set grails proxy have error & grails install
我想知道錯誤 grails 你能幫我嗎 |Loading Grails 2.4.0 |Configuring classpath Error | Resolve error obtaining dependencies: Failed to read artifact descriptor for ...
[英]How to add inList constraints into a variable from different class?
我對類中變量的inList約束變大了。 我需要一個替代方案。 我認為可行的一種方法是在單獨的類中創建一個列表,並將其稱為inList約束。 例如,代替 我可以做類似的事情嗎 任何有用的提示將不勝感激。 ...
[英]How can I enforce using a GORM data service instead of GormEntityApi
如何強制我的 Grails 應用程序中的所有實體持久性操作通過GORM 數據服務發生,而不是直接在我的域類(例如GormEntityApi和動態查找器中的方法)上發生? 理想情況下, GormEntityApi和動態查找器方法在我的域類中根本不可用,但我也接受一種解決方案,該解決方案通過使方法全部 ...
[英]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 ...
[英]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: [ ...