im尝试使用以下序列化代码从数据库mysql中获取一些值:
/**
* signInGoogle
*/
private fun signInGoogle() = launch{
//init google sigin
val gso = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(GOOGLE_WEBCLIENT_ID)
.requestEmail()
.build()
val gApiClient = GoogleApiClient.Builder(activity)
.addApi(Auth.GOOGLE_SIGN_IN_API,gso)
.build()
val c = gApiClient.blockingConnect()
if(c.isSuccess && gApiClient.isConnected){
gApiClient.clearDefaultAccountAndReconnect().await()
}
val mGoogleSignInClient = GoogleSignIn.getClient(activity, gso)
val signInIntent = mGoogleSignInClient.signInIntent
//start activit
startActivityForResult(signInIntent, GOOGLE_SIGNIN)
}//end request google login
问题在于,sequelize不仅获取表中所有条件的数据,而且还获取表中的所有值。
有什么主意吗?
我们最近更改了AWS中的服务器项目(将elasticbeanstalk更改为其他实例eb)
答案 0 :(得分:2)
我只能找到的问题是 Where
应该是小写,例如 where
subSector.findAll({
Where: {
Enterprise_Evaluation_ID: 2
}
})
将其更改为此:
subSector.findAll({
where: { // <--------- HERE
Enterprise_Evaluation_ID: 2 // <--------- Also make sure the field name is proper
}
})