Warnings while querying reference fields with a key
Hi! I come to found a warning when i query reference fields with Key. I don't think it's necessary. But if it is, Is there way to suppress this warning. Let me explain the situation
I have a object
@Entity(noClassnameStored = true) public class CrewLabel implements IsSerializable {
@Id public ObjectId id;
@Reference public Employee owner; }
When i try to query it like this
Query query = createQuery(); query.field("owner").equal(new Key(Employee.class, ownerId));
I got the warning
WARNING: The type(s) for the query/update may be inconsistent; using an instance of type 'com.github.jmkgreen.morphia.Key' for the field 'com.statu.alarga.web.shared.model.CrewLabel.owner' which is declared as 's.model.Employee' --@--com.statu.alarga.web.server.dao.CrewLabelDaoImpl.findLabelsOfCrew(CrewLabelDaoImpl.java:72)
What can we do about this?
Thank you.
Regards, Ismet
[ pulled from https://github.com/jmkgreen/morphia/issues/65 ]
How do i vote for this one? Its driving me nuts and filling up my logs with crap.
You can star the issue, its on the header. But i dont think they are going to fix it soon, since there more important issues.
I'm guessing your right based on the age of this problem, its extremely annoying since its a simply change and causes a lot of trouble in a running system.
I have some largerish issues to resolve in the next release but I'll take a look at this one, too. I was just looking at a similar issue today, actually.
Any idea which version this will make it into?
0.106
hi did this ever get resolved,im trying to do the same thing,