Hi,
I created a model with EOModeler. There are some classes in my project
which represent the entities of my model. Now I come to the point, that
I must fetch data from the database. In my Main component I created an
EOQualifier which combines 4 attributes:
EOQualifier eq = new EOAndQualifier(new NSArray<EOQualifier>(new
EOQualifier[] {
EOQualifier.qualifierWithQualifierFormat(MyEntity.A_KEY + "=%s",
new NSArray<Object>(new Object[] { getSession().getA() })),
EOQualifier.qualifierWithQualifierFormat(MyEntity.B_KEY + "=%s",
new NSArray<Object>(new Object[] { getSession().getB() })),
EOQualifier.qualifierWithQualifierFormat(MyEntity.C_KEY + "=%s",
new NSArray<Object>(new Object[] { getSession().getC() })),
EOQualifier.qualifierWithQualifierFormat(MyEntity.D_KEY + "<=?",
new NSArray<Object>(new Object[] {new NSTimestamp() }))
}));
The D_KEY attribute is a timestamp, how I can define the format for such
a column? In
https://wiki.wocommunity.org/download/attachments/1049043/EnterpriseObjects.pdf
I did not find any information about Timestamp attributes. Is that the
right way to fetch data from the database? I would use the Qualifier
with:
EOEditingContext ec = getSession().defaultEditingContext();
NSArray res = ec.objectsWithFetchSpecification(new
EOFetchSpecification(StXSession.ENTITY_NAME, eq,
null));
Best regards
Andre
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com