object-object-mapping Questions

13

Solved

My goal is to configure the objectMapper in the way that it only serialises element which are annotated with @JsonProperty. In order to do so I followed this explanation which says how to configura...
Farrar asked 21/10, 2011 at 18:59

10

Solved

I'm using Automapper and I have the following scenario: Class OrderModel has a property called 'ProductName' that isn't in the database. So when I try to do the mapping with: Mapper.CreateMap<O...
Annecorinne asked 14/2, 2011 at 0:22

2

Solved

I want the generated mapstruct mapping method to return null if all the properties referenced in @Mapping/source are null. For exemple, I have the following mapping : @Mappings({ @Mapping(target...
Approximal asked 13/4, 2017 at 12:11

2

Solved

I want to map the following classes class Schedule { ZoneId timezoneId; List<AvailabilityRule> rules; } class AvailabilityRule { long startEpoch; long endEpoch; } to these classes. clas...
Cootch asked 20/1, 2022 at 9:41

2

My Controller returns a list of MyObj objects (using @ResponseBody) public MyObj { int a; int b; } The return JSON looks like this: [{"a":1,"b":2},{"a":2,"b":2}] I would like to wrap this ...
Firman asked 31/1, 2013 at 17:28

4

can someone please explain the difference between system design and object oriented design? Object oriented design involves object modeling and uses object oriented concepts such as Abstraction, E...

3

Solved

I'm trying to map following source classes to target class using MapStruct. Target Classes : public class Response { private List<Customer> customer = new ArrayList<Customer>(); } pub...

3

Solved

I am using ModelMapper Framework (http://modelmapper.org/) for mapping objects in Java. I have encountered a problem while mapping concrete classes (DTO to Entites) containing abstract classes. Ex...
Gelasius asked 23/1, 2015 at 14:17

2

is there a way in mapstruct to ignore the case of the fields when mapping. let say i want to map following two classes public class Customer { private String ID; public String getID() { retu...
Tiphanie asked 1/4, 2020 at 19:5

3

I have a rather big bean (~ 100 properties) that is mapped into several smaller objects. It may occur that the smaller target objects have properties with the same name as in my source bean, but no...
Emergency asked 6/1, 2016 at 9:26

2

Solved

I'm needing to do some mapping between objects (e.g. PersonModel to PersonViewModel) and am researching on the different approaches to do this. Specifically I'm working with Entity Framework and tr...
Vershen asked 19/8, 2016 at 13:46

3

Solved

I have to do some object to object mapping between domain classes used in a C# project and classes which are sent to flash clients. My first choice was Automapper. But I've had some issues with it ...
Flasher asked 22/10, 2010 at 11:10

1

Solved

I'm trying to map a bean which has some JAXB elements like @XmlSeeAlso, @XmlElement, @XmlSchemaType as properties for that class. @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Customer")...
Beckerman asked 30/3, 2018 at 8:16

2

It seems like Spring MVC doesn't know how to map a javascript "map" to a Java map object In the web UI, say, foo.jsp, <script> var myMap = {}; myMap["people"] = ["Alex","Bob","Charles","Da...
Imbue asked 14/8, 2013 at 22:34

2

Solved

I am using MapStruct library to map objects but I got this error: Can't map property "java.util.Date aDate" to "javax.xml.bind.JAXBElement ADATE". Consider to declare/implement a mapping method: "...
Theurgy asked 8/1, 2016 at 8:7

2

Solved

I have Object1 and Object2. Now, I want to map object3, with attributes from 1 & 2. Say, I have 2 object: 1. User: {first_name, last_name, id} 2. Address: {street, locality, city, state, pin,...
Ine asked 7/12, 2015 at 9:48

1

I'm currently using Dozer for mapping Entity objects to Dto objects in my project. My question is how to limit the levels or the depth of internal mappings? For example I have a AccountProfile e...
Asleyaslope asked 3/11, 2015 at 12:14

3

Solved

I am trying to unmarshall a json file in a way such that few properties of Json are mapped into a HashMap that is present in my model class.Rest of the properties are mapped to the respective field...
Downing asked 7/5, 2015 at 12:44

3

Solved

I'd hope to find an example code to do a deep copying of objects in ECMAScript5. The copying should be able to clone Nested objects Nested arrays Nested objects in arrays (clone each array item...

2

Solved

I've been reading Tim McCarthy's awesome book on DDD in .NET. In his example application though, his underlying data access is using SqlCE and he's handcrafting the SQL inline. I've been playing w...

4

Solved

Everytime I'm looking for AutoMapper stuff on StackOverflow, I'm reading something about ValueInjecter. Can somebody tell me the pros and cons between them (performance, features, API usa...
Loverly asked 11/1, 2011 at 22:49

4

Solved

I'm new to domain driven design but want to learn it and use it for a new application. I will be using Entity Framework for data access. The basic layout so far is: ASP.NET MVC and other client...
1

© 2022 - 2025 — McMap. All rights reserved.