我正在使用RxFirebase。如何通过值“名称”获取子级(例如5098)。
这是我的代码。
RxFirebaseDatabase.observeSingleValueEvent(
remoteStObjectsDatabase.child("stobjekti").orderByChild("name").equalTo("TP-6220"),
DataSnapshotMapper.listOf(StObject::class.java)
)
data class StObject(
var address: String?,
var construction: String?,
var date_of_manufacture: String?,
var in_service_from: String?,
var name: String?,
var region_city: String?,
var technical_object: String,
var type: String?,
var x: String?,
var y: String?)