Questions tagged [object-object-mapping]

129 questions
1
vote
4 answers

Defining an object with a dynamic key in node js (javascript)

I need to do this : let obj = {} obj.obj1 = {'obj11':5} console.log(obj.obj1.obj11) //5 but I need to define the last key of the last object dynamically for example, something like this: let obj = {} key = 'obj11' obj.obj1 = { key…
1
vote
2 answers

Mapping IDataReader to object without third party libraries

Are there any quick way to map some IDataReader to object without third party libraries such as AutoMapper or ValueInjecter?
Saw
  • 6,199
  • 11
  • 53
  • 104
1
vote
1 answer

Entity Framework Core Mapping Multiple objects to an object in one to many

I am trying to work out the best way to handle a Note object that is linked to multiple objects i.e. Contacts, Quotes. These objects can have many Notes, A Quote has many Notes. public class Note { public int Id { get; set; } public string…
1
vote
1 answer

Mapping a hierarchy of entities to a hierarchy of DTOs using Orika

Is it possible to map an object to its corrisponding DTO when both belonging to a class hierarchy? For example: I have a BaseEntity and some ExtendedEntity1 .. ExtendedEntityN On the other side I have a BaseDTO and some ExtendedDTO1 ..…
davioooh
  • 23,742
  • 39
  • 159
  • 250
1
vote
1 answer

AlamofireObjectMapping Error: Cannot call GET

UPDATE My POST request in Login.swift returns values that I would like mapped to the variables in Particulars.swift (E.g. the API token) and by extension, written to realm. How do I go about doing so? My Login.swift code: import Foundation import…
noobdev
  • 417
  • 6
  • 25
1
vote
0 answers

ModelMapper Condition On Non-Deepest Property (With java.util.Optional)

Given this simplification of my structure: public class Order { public String firstName; public Optional paymentInfo; } public class PaymentInfo { public String billingAddress; public int totalAmount; } I want to map…
Zout
  • 821
  • 10
  • 18
1
vote
2 answers

initWithDictionary: in Objective-C and Swift

In Objective-C we can use object mapping with json response like this way PolicyData *policyData = [[PolicyData alloc] initWithDictionary:responseObject error:&err]; Here we can map responseObject with PolicyData class properties. How i can do the…
Sofeda
  • 1,361
  • 1
  • 13
  • 23
1
vote
1 answer

Selma map List to T

I am using Selma and I have the following class: public class Customer { private int id; private String email; private String firstName; private String lastName; private Date registeredDate; private List
Ivan Stoyanov
  • 5,412
  • 12
  • 55
  • 71
1
vote
1 answer

MapStruct: Object.class to Custom.class mapping

I'm a newbie with MapStruct, and need some help with that. I have a Source class, with an attribute Object input; Which, in runtime, returns a custom object named TicketDetails. Now, in my target class there is a attribute named, MyTicket…
anij
  • 1,322
  • 5
  • 23
  • 39
1
vote
1 answer

Getting child RLMObjects from transformer using ObjectMapper

I'm using both ObjectMapper (https://github.com/Hearst-DD/ObjectMapper) and Realm in my project. My Objects are all RLMObjects; I have for example a Blog Object which contains attachments: dynamic var attachments = RLMArray(objectClassName:…
Mathijs Segers
  • 6,168
  • 9
  • 51
  • 75
1
vote
0 answers

When using Object Mapper the format of the output is different in groovy. Why?

Why do I get the "\" everywhere ? Method I Use: @RequestMapping(value = '/showFromMongo', method = RequestMethod.GET) def showFromMongoDB() { //println 'testit' def obj = repository.findByLastName("Vinodh"); ObjectMapper…
1
vote
3 answers

Querying with cqlengine

I am trying to hook the cqlengine CQL 3 object mapper with my web application running on CherryPy. Athough the documentation is very clear about querying, I am still not aware how to make queries on an existing table(and an existing keyspace) in my…
Abhiroop Sarkar
  • 2,251
  • 1
  • 26
  • 45
1
vote
0 answers

Nested Array mapping restkit v.20

i wanna to map object in Google Places Api Photos "photos" : [ { "height" : 1224, "html_attributions" : [ "\u003ca href=\"https://plus.google.com/105663944571530352563\"\u003eJoshua…
1
vote
3 answers

solr json parsing with java

I am searching through solr. it gives me response in json. like following: {response {numfound:# , docs{ [ { id="#" model="#" } { id="#" model="#" } ] } } I want to extract just the ids from this and make java…
user1964901
  • 29
  • 1
  • 7
1
vote
2 answers

Mapping an object to JSON using RKObjectMapping

I'm a bit new to RKObjectMapping, and I'm having some trouble figuring this out. I have a class which has an array of objects called myObjects. This type of object already has an object mapping in its class. I want to map to the following kind of…
ferson2020
  • 3,015
  • 3
  • 18
  • 26
1 2 3
8 9