目前,我在控制器中找到了他:
@Crud({
model: {
type: Broker
},
query: {
join: {
user: {
eager: true,
exclude: ['password']
}
}
}
})
@Controller('broker')
@UseGuards(AuthGuard('jwt'))
export class BrokerController {
constructor(public service: BrokerService) {}
}
Run Code Online (Sandbox Code Playgroud)
one to many
用户和代理之间存在关系。我正在通过jwt令牌对用户进行身份验证,并且需要根据用户ID过滤数据。有什么办法可以通过Crud配置做到这一点?
我有一个 Campaign 模型,这就是我的自定义映射的样子:
searchkick mappings: {
campaign: {
properties: {
title: {type: "string", analyzer: "snowball"},
deal_title: {type: "string", analyzer: "snowball"},
description: {type: "string", analyzer: "snowball"}
}
}
}
Run Code Online (Sandbox Code Playgroud)
当我重新索引竞选文件时
c = Campaign.search "this is"
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Searchkick::InvalidQueryError: [400] {
"error":{
"root_cause":[
{
"type":"query_parsing_exception",
"reason":"[match] analyzer [searchkick_search] not found",
"index":"campaigns_development_20160205130806185",
"line":1,
"col":96
}
],
"type":"search_phase_execution_exception",
"reason":"all shards failed",
"phase":"query",
"grouped":true,
"failed_shards":[
{
"shard":0,
"index":"campaigns_development_20160205130806185",
"node":"kiTXKzIEQjuI9UNDzXZ1DA",
"reason":{
"type":"query_parsing_exception",
"reason":"[match] analyzer [searchkick_search] not found",
"index":"campaigns_development_20160205130806185",
"line":1,
"col":96
}
}
]
},
"status":400
}
Run Code Online (Sandbox Code Playgroud)
此外,当我将 …
我正在使用以下意图发送支持邮件:
Intent emailIntent = new Intent(Intent.ACTION_SENDTO);
emailIntent.setData(Uri.parse("mailto: support@abc.in"));
emailIntent.putExtra(Intent.EXTRA_SUBJECT,"Feedback for ABC Android " + Utils.getAppVersionName());
emailIntent.putExtra(Intent.EXTRA_TEXT, "\n\nBelow information is" +
"App Version - " + Utils.getAppVersionName() + "\n" +
"OS Version - " + Build.VERSION.RELEASE + "\n" +
"API Level - " + Build.VERSION.SDK_INT + "\n" +
"Device Model - " + android.os.Build.MODEL + "\n" +
"Device Manufacturer - " + Build.MANUFACTURER);
context.startActivity(Intent.createChooser(emailIntent, "Send through..."));
Run Code Online (Sandbox Code Playgroud)
它工作正常并打开电子邮件选择器。但光标出现在 EXTRA_TEXT 内容的末尾。我希望光标位于此内容的开头。我可以以某种方式指定这个吗???
我正在尝试集成ag-grid
到我现有的 vue.js 项目中。该表未正确呈现。我按照 ag-grid Here网站上的教程进行操作。
<template>
<v-container>
<v-row>
<v-col cols="12" sm="3"></v-col>
<v-col cols="12" sm="6">
<ag-grid-vue
class="ag-theme-alpine"
:columnDefs="columnDefs"
:rowData="rowData"
:modules="modules"
>
</ag-grid-vue>
</v-col>
<v-col cols="12" sm="3"></v-col>
</v-row>
</v-container>
</template>
<script>
import { AgGridVue } from "@ag-grid-community/vue";
import { ClientSideRowModelModule } from "@ag-grid-community/client-side-row-model";
export default {
name: "VueGridTest",
data() {
return {
columnDefs: null,
rowData: null,
modules: [ClientSideRowModelModule],
};
},
components: {
AgGridVue,
},
beforeMount() {
this.columnDefs = [
{ headerName: "Make", field: "make" },
{ headerName: "Model", …
Run Code Online (Sandbox Code Playgroud)