Questions tagged [modelmapper]

An intelligent object mapping framework that automatically maps objects to each other.

ModelMapper is an intelligent object mapping framework that automatically maps objects to each other. It uses a convention based approach to map objects while providing a simple refactoring safe API for handling specific use cases.

435 questions
0
votes
2 answers

cglib - creating class proxy in OSGi results in NoClassDefFoundError

OK so this is some kind of theoretical question for you guys. I am experimenting with cglib's Enchancer - creating a proxy for a class. My code is running in a Felix OSGi container. The hierarchy looks kind of similar to that: // Bundle A; //…
mdzh
  • 1,030
  • 2
  • 17
  • 34
0
votes
1 answer

ModelMapper: how to handle null values for enums

I am trying to map one object type to another using ModelMapper. I have defined the following mapping in my PropertyMap…
mdzh
  • 1,030
  • 2
  • 17
  • 34
0
votes
1 answer

ModelMapper Matching Strategy: Standard with Reference Types

Entity Classes: class User{ private Name name; private int age; private String email; private Date dob; private Address address; // No Arguments Constructor , All Arguments Constructor , Setters, Getters and toString } class…
user8671234
0
votes
1 answer

Modelmapper does not execute converter convert method

I have a spring application that uses the modelmapper to convert between the entity and the DTO objects. I have a String in the DTO that represents a ZonedDateTime object in the Entity. I have written the following snippet in the…
kavita
  • 845
  • 4
  • 14
  • 40
0
votes
1 answer

Mapping JSON response to objects using Rx programming Moya

I am trying to use the mapObject function of the ModelMapper library like this : return provider.request(API.userInfo(userId: API.userId)) .mapObject(type: UserTest.self, keyPath: "user") with this Json : { "success": true, …
Zanclus
  • 3
  • 5
0
votes
0 answers

ModelMapper maps username to userId

I'm using ModelMapper to map UserDto class to User entity (details below) but it erroneously maps username to userId. How do I prevent this from happening. public class User { @Id @GeneratedValue(strategy=GenerationType.AUTO) private…
Olantobi
  • 869
  • 1
  • 8
  • 16
0
votes
1 answer

ModelMapper exception - cannot be cast to org.modelmapper.internal.Mutator

I am getting bellow exception this exception. I am using modelmapper to covert between classes in my project. The Deal and DealDocument classes are identical. The Deal document class is as bellow: public class DealDocument extends Deal implements…
Deibys
  • 619
  • 3
  • 9
  • 18
0
votes
1 answer

effective way to loopoever three array lists to compare values

I have two object of arraylist orderList, productList and one String arraylist customerIdList.I have ProductInfo POJO to be mapped with orderList and productList where cuustomerId should match.If I don't have order or productlist for given ProdId I…
user1653027
  • 789
  • 1
  • 16
  • 38
0
votes
2 answers

Deep Mapping with Providers and Immutable Objects

I have a model like this: public class PersonDto { private CarDto car; public CarDto getCar() { return car; } public void setCar(CarDto car) { this.car = car; } public static class CarDto { …
Gerard Ribas
  • 717
  • 1
  • 9
  • 17
0
votes
1 answer

function classes function is not returning to controller classes calling function

i am calling a function from controller class. function is defined in another class function. but before executing return code it gives error. (as debugging) it jumps from the line modelMap.put("list", arraylist); it gives exception,…
Suraj Roy
  • 51
  • 2
  • 12
0
votes
1 answer

Modelmapper with Collection and JPA

I read about ModelMapper, today and it seems to be very interesting, but I'm not sure about the right usage. I have a Spring-Project like this: I have my model classes which are necessary for serialization. My REST controller return DTO-objects to…
AndreasGloeckner
  • 292
  • 3
  • 5
  • 18
0
votes
1 answer

ModelMapper and tree structures

I've got a tree-like structure of entities that I'm trying to map to DTOs using ModelMapper. The trick is that I'm trying to break the graph after the first parent. Following is a example of what I'm trying to do. I've got a Category entity which…
willix
  • 686
  • 1
  • 6
  • 13
0
votes
1 answer

Java Modelmapper: Converter doesnt get used

im working on a little java-program that synchronizes active directory users with users in my db. therefor, i am using modelmapper. seems to be working fine and is also pretty fast. anyway i added a converter to my mapping configuration. shows no…
Master Azazel
  • 612
  • 1
  • 12
  • 32
0
votes
1 answer

JDBI, Model Mapper and SQL Object Queries

I'm using Model Mapper with JDBI, but I'm not able to use model mapper with SQL Object Queries. For example I have this select @SqlQuery("select * from example") and documentation says I have to use a ResultSetMapper or ResultSetMapperFactory to…
Silvia
  • 11
  • 5
0
votes
1 answer

Java ModelMapper Flat Model to Hierarchical Model

I am using www.modelmapper.org and I am working on mapping the same "flat" java DTO into several "hierarchical" DTO. The "flat" DTO has a number of primitive properties. The "hierarchical" have a number of complex types that hold a number of…
Martin
  • 1
  • 1
1 2 3
28
29