Ok... I've had a little clue...
I can use the method "isMandatory()" from
( the XML mapping file has property "isMandatory"
I strongly believe means whether that field has the
attribute "NOT NULL")
the question now is how do i instantiate this
I have this snipplet from the web..
Iterator it = ent.getAttributes().iterator();
DbAttribute at = (DbAttribute) it.next();
Not too sure about this, but I guess that
"getAttributes()" is a method from class
THis is what I think:
I have to instantiate this Entity class,
and call it's "setDataMap()" method.
--> I think setDataMap is setting which XML data
Now the problem is, how do i get the DataMapping
Is it stored somewhere?
If it has to be read manually everytime, that will
really really slow down the whole system (parsing XML
Sorry if this is a bit messy...
But I hope you get the overall picture..
--- Alex Gunawan Wibowo <netzone_tec..ahoo.com>
> Does anyone know if Cayenne can check if a
> field in a table is required to be filled (i.e. NOT
> I'm developing an application with Struts, and I
> this behaviour to check if a particular field has
> provided by the user.
> I can manually code this behaviour by reading a
> property file.. but that is a bit dirty i would say.
> (i.e. a change in the database schema would require
> change in the property file, etc etc).
> Thank you very much for the help!
> Best regards,
> Alex Wibowo
> Alex Wibowo
> ~ Second is a failure ~
> The University of Melbourne
> Department of Computer Science and Software
> Website - http://www.cs.mu.oz.au/~agwibowo
> Team Wasabi -
> Do you Yahoo!?
> All your favorites on one personal page – Try My
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
This archive was generated by hypermail 2.0.0 : Tue Nov 23 2004 - 22:16:59 EST