I have log data that I wish to manage with js-data (http://www.js-data.io/docs/dsdefaults#idattribute) that has no primary key.
Do I need to generate a key or can js-data be configured to allow access to the data without a pk?
Can I get js-data to generate a pk? I have no need to persist this data, just wanted to use the js-data capabilities to query it.
Example:
$provide.factory('syslog', ['DS', function(DS) {
return DS.defineResource({
name: 'log'
});
}]);
$provide.factory('LoggingServices', ['$q', '$filter', '$log', 'syslog', function($q, $filter, $log, syslog) {
function injectMockLogs () {
syslog.inject({
'messages': [
{
'time':'2016-03-29 09:32:43',
'severity':'INFO',
'user':'carolyn',
'auth_type':'RADIUS',
'method':'UI',
'event_id':1107,
'message':'In make_radius_request: Making radius request for user carolyn',
'full_message':'2016-03-29 09:32:44 "info" ns [1107]: RADIUS auth:In continue_radius_auth: Starting RADIUS authentication for user carolyn @ 10.217.22.20'
},{
'time':'2016-03-29 09:32:44',
'severity':'INFO',
'user':'carolyn',
'auth_type':'RADIUS',
'method':'UI',
'event_id':1107,
'message':'In make_radius_request: Making radius request for user carolyn',
'full_message':'2016-03-29 09:32:44 "info" ns [1107]: RADIUS auth:In make_radius_request: Making radius request for user carolyn'
},{...