Questions tagged [object-object-mapping]
129 questions
2
votes
1 answer
ModelMapper - Failed to convert ArrayList to List
I have the following Beans
public class Ticket extends BaseEntity {
private ForeignCollection< TicketDetail > ticketDetails;
}
public class TicketDto extends BaseDto {
private List< TicketDetailDto > ticketDetails;
}
And I'm mapping, using…

J. Pichardo
- 3,077
- 21
- 37
2
votes
1 answer
Mapping a string Array to an Object using ValueInjecter
I'm looking for suggestions on how I might solve the following problem using ValueInjecter.
NOTE: Before anyone jumps in and a) tells me I'm doing it wrong or b) tells me I shouldn't be using ValueInjecter - please don't. beacuse a) I have no…

shawty
- 5,729
- 2
- 37
- 71
2
votes
1 answer
object to object mapping and unit-testing / TDD
I am trying to follow TDD principles in all my code base. The frontend (MVC) and backend part are split, and frontend use their own Model objects, while backed use database objects which are then saved to a document database (RavenDb).
This…

Karl Cassar
- 6,043
- 10
- 47
- 84
2
votes
1 answer
Nhibernate/Hibernate, lookup tables and object design
I've got two tables. Invoice with columns CustomerID, InvoiceDate, Value, InvoiceTypeID (CustomerID and InvoiceDate make up a composite key) and InvoiceType with InvoiceTypeID and InvoiceTypeName columns.
I know I can create my objects like:
public…

lancscoder
- 8,658
- 8
- 48
- 68
2
votes
1 answer
Reducing DB calls when using RABL with mongoid
I have a few scenarios where I would like to do as little DB calls as much as possible via eager loading, but I have not been able to do it well.
Given the 2 scenarios below, how can i change my RABL to do as little calls as possible?
OBJECT…

meow
- 27,476
- 33
- 116
- 177
2
votes
1 answer
Unable to parse Json with Map,ObjectMapper
Now a days I'm having experience of Json parsing .Not have much practice with collection.I have a Json String
{
"time":1352113682,
"api_version":"1",
"firstname":"abc",
"lastname":"xyz",
"company":"Cool Apps",
…

Mufrah
- 534
- 7
- 22
2
votes
1 answer
Many-to-many relationships with objects, where intermediate fields exist?
I'm trying to build a model of the servers and applications at my workplace. A server can host many applications. An application can be hosted across many servers.
Normally I would just have the host class contain a List, and the application class a…

Swiftslide
- 1,307
- 7
- 23
- 34
1
vote
1 answer
Cloning an instance of object to its base type
I have the following class:
public class AddCouponInfoRequest : namespace.Request
{
}
I have an instance of AddCouponInfoRequest in my hand and I want to get an instance of namespace.Request with the same values.
This doesn't work…

xkcd
- 2,538
- 11
- 59
- 96
1
vote
2 answers
Send post request and map response to object
I am new to restKit and I have a few questions for you. I
cant understand how to send Post request using json/xml to my web
services and map the incoming reply with my classes. Can any one give
me a help on that. The code I am using is this:
in…

greenLizard
- 2,326
- 5
- 24
- 30
1
vote
2 answers
RestKit - Objectmapping! What is going wrong here?
I have a JSON response from my server.
The data, taken from the RestKit log looks like this:
sourceObject: (
{
place = {
"place_id" = "3cc1e372-f9d9-11e0-aba9-9415ab1a8034";
placeinfo = {
…

Thomas
- 75
- 7
1
vote
1 answer
RestKit and Core Data
When doing managed objectmapping with RestKit, using core data, i map using my NSManaged subclasses fe. User.m
And that works fine.
But if i need to do ordinary objectmapping it is not possible to still use the NSManaged Subclass - User.m, as the…

Thomas
- 75
- 7
1
vote
1 answer
Missing values in Mongoose pre-validate when mapping object lists to string lists
I'm trying to create a new record using data from the request body. The request body data looks like this:
{
extras: [{value: "string"}, {value: "string"}, {value: "string"}],
skills: [{value: "string"}, {value: "string"}]
}
These properties…

sanbinary
- 81
- 1
- 8
1
vote
1 answer
How to add value from Json into a list object using Flutter?
I have a class User and a List like this:
List users = List();
class User {
int id;
String name;
User({this.id, this.name});
factory User.fromJson(Map json) {
return User(
id: json["id"] as int,
…

Alex
- 727
- 1
- 13
- 32
1
vote
2 answers
Mapstruct: Check for null for source before mapping to target
Mapstruct: Check for null for source before mapping to target. Require to throw a custom exception from mapstruct interface if the source is null.

Rajeshwar
- 391
- 1
- 5
- 19
1
vote
2 answers
Attempting to use object Object as an array in Angular 6
Here's some context of my problem:
I am coding an app in Angular 6 that is supposed to read data from my localhost:5000 port to get JSON data and display it in the Angular app. The angular app is getting the data from my localhost perfectly, except…

Enesxg
- 127
- 4
- 13