Discussion:
[castor-dev] Introduction and some questions
Ivo Friedberg
2009-12-03 18:56:44 UTC
Permalink
Hello,



At first I want to introduce myself (Ivo Friedberg) and a colleague of mine,
Michael Schroeder. We are both studying Informatics on the Technical
University of Vienna and are now participating in a lecture called Advanced
Software Engineering. In the context of this lecture we decided (after a
little presentation of Werner) to work on Castor this semester and so here
we are.



The last month we were up to learn the basic understanding of the technology
and structure of Castor (some of you may have noticed some strange jira
issues?!) and now we have actually started with the underlying task. This is
now to exchange the global AutoStore option with a finer grained cascading
system. It should work directly in the mapping file allowing to specify
which operations (create, update, delete,.) should be performed cascading
and which not!



In order to achieve this, we started implementing a cascading attribute to
the generated java classes in Castor and implemented the cascading="create"
option. This should make it able that only new added objects are stored
automatically but no updates or delete operations. In order to reach this
goal (I think we are nearly there right now although it's some kind of
bungling solution right now cause the attribute is only a String value right
now which is going to be checked ;))



Now to our questions:



1. dependent objects: we came upon the question how to treat dependent
objects. As far as we found out, changing the master object of an depending
object ignores the value of autostore and always creates the new master
object. that seams reasonable, cause by the means of dependent objects they
have to have a master object. But now we questioned whether we should take
dependent relations into account while defining the cascading attribute, for
example always assume cascading create and cascading delete as true but not
update. This would be possible and there is the question whether this is
interesting for castor or undermining the idea of the dependent objects!



2. We where about to create some testcases but the question occurred
where to put them and how to set up the derby database right. Is it better
to make an own prpject for testing our implementation and not putting the
tests directly into the castor project?

@Werner: Do you have any specific wishes how we should treat this?



Thanks for reading and have a nice evening,

Ivo
Ralf Joachim
2009-12-03 19:25:07 UTC
Permalink
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Ivo, Hi Michael,<br>
<br>
see my comments inline.<br>
<br>
Ivo Friedberg schrieb:
<blockquote cite="mid:000f01ca744a$5bae1e20$130a5a60$@at" type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:1363360619;
mso-list-type:hybrid;
mso-list-template-ids:-435656278 201785359 201785369 201785371 201785359 201785369 201785371 201785359 201785369 201785371;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span lang="EN-US">At first I want to introduce
myself (Ivo
Friedberg) and a colleague of mine, Michael Schroeder. We are both
studying Informatics
on the Technical University of Vienna and are now participating in a
lecture
called Advanced Software Engineering. In the context of this lecture we
decided
(after a little presentation of Werner) to work on Castor this semester
and so
here we are.</span></p>
</div>
</blockquote>
Very much appreciated.<br>
<blockquote cite="mid:000f01ca744a$5bae1e20$130a5a60$@at" type="cite">
<div class="Section1">
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The last month we were up to
learn the basic
understanding of the technology and structure of Castor (some of you
may have
noticed some strange jira issues?!) and now we have actually started
with the underlying
task. This is now to exchange the global AutoStore option with a finer
grained
cascading system. It should work directly in the mapping file allowing
to
specify which operations (create, update, delete,&#8230;) should be performed
cascading and which not!</span></p>
</div>
</blockquote>
I have recognized these jira issues but had informed by Werner before.<br>
<blockquote cite="mid:000f01ca744a$5bae1e20$130a5a60$@at" type="cite">
<div class="Section1">
<p class="MsoNormal"><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In order to achieve this, we
started
implementing a cascading attribute to the generated java classes in
Castor and
implemented the cascading=&#8221;create&#8221; option. This should make it able
that only new added objects are stored automatically but no updates or
delete
operations. In order to reach this goal (I think we are nearly there
right now
although it&#8217;s some kind of bungling solution right now cause the
attribute is only a String value right now which is going to be checked
;))<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Now to our questions:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoListParagraph" style="text-indent: -18pt;"><!--[if !supportLists]--><span
lang="EN-US"><span style="">1.<span
style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-US">dependent
objects: we came upon
the question how to treat dependent objects. As far as we found out,
changing
the master object of an depending object ignores the value of autostore
and
always creates the new master object. that seams reasonable, cause by
the means
of dependent objects they have to have a master object. But now we
questioned
whether we should take dependent relations into account while defining
the
cascading attribute, for example always assume cascading create and
cascading
delete as true but not update. This would be possible and there is the
question
whether this is interesting for castor or undermining the idea of the
dependent
objects!</span></p>
</div>
</blockquote>
As far as I know about depend every call to Datebase methods load(),
create(), update() or delete() are forbidden for dependent entities and
throw exceptions. For me this seams about similar to what should happen
when one declares a relation cascade=all. The difference between using
depend and cascade=all is, that depend also prevents access to
dependent entities at methods of Database interface. Does that make
some sense?<br>
<blockquote cite="mid:000f01ca744a$5bae1e20$130a5a60$@at" type="cite">
<div class="Section1">
<p class="MsoListParagraph" style="text-indent: -18pt;"><span
lang="EN-US"><o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoListParagraph" style="text-indent: -18pt;"><!--[if !supportLists]--><span
lang="EN-US"><span style="">2.<span
style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span lang="EN-US">&nbsp;We where about
to create
some testcases but the question occurred where to put them and how to
set up
the derby database right. Is it better to make an own prpject for
testing our
implementation and not putting the tests directly into the castor
project? <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 35.4pt;"><span lang="EN-US">@Werner:
Do you
have any specific wishes how we should treat this?</span></p>
</div>
</blockquote>
The testcases should go into cpactf. Its framework will create/drop
tables for you if you supply the scripts and will also initialize
JDOManager. As I have not yet added much javadoc to the framework I
suggest to look at one of the other testcases. Numbering of test
packages relate to jira issue number. If you have questions regarding
the cpactf ask them away by mail or join me on Castor irc where I try
to be online as offen as possible.<br>
<blockquote cite="mid:000f01ca744a$5bae1e20$130a5a60$@at" type="cite">
<div class="Section1">
<p class="MsoNormal" style="margin-left: 35.4pt;"><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks for reading and have a
nice evening,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Ivo<o:p></o:p></span></p>
</div>
</blockquote>
Regards<br>
Ralf<br>
<pre class="moz-signature" cols="72">--

Syscon Ingenieurb&uuml;ro f&uuml;r Me&szlig;- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstra&szlig;e 11
72127 Kusterdingen
Germany

Tel. +49 7071 3690 52
Mobil: +49 173 9630135
Fax +49 7071 3690 98

Internet: <a class="moz-txt-link-abbreviated" href="http://www.syscon.eu">www.syscon.eu</a>
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:***@syscon.eu">***@syscon.eu</a>

Sitz der Gesellschaft: D-72127 Kusterdingen
Registereintrag: Amtsgericht Stuttgart, HRB 382295
Gesch&auml;ftsleitung: Jens Joachim, Ralf Joachim
</pre>
</body>
</html>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Werner Guttmann
2009-12-10 08:53:45 UTC
Permalink
Hi,

I agree with ralf that all tests should eventually end up in the
functional test suite of castor JDO, but right now, plain JUnit tests is
equally fine (as long as they will be transferred into the test suite at
a later time).

Cheers
Werner
Post by Ralf Joachim
Hi Ivo, Hi Michael,
see my comments inline.
Post by Ivo Friedberg
Hello,
At first I want to introduce myself (Ivo Friedberg) and a colleague of
mine, Michael Schroeder. We are both studying Informatics on the
Technical University of Vienna and are now participating in a lecture
called Advanced Software Engineering. In the context of this lecture
we decided (after a little presentation of Werner) to work on Castor
this semester and so here we are.
Very much appreciated.
Post by Ivo Friedberg
The last month we were up to learn the basic understanding of the
technology and structure of Castor (some of you may have noticed some
strange jira issues?!) and now we have actually started with the
underlying task. This is now to exchange the global AutoStore option
with a finer grained cascading system. It should work directly in the
mapping file allowing to specify which operations (create, update,
delete,…) should be performed cascading and which not!
I have recognized these jira issues but had informed by Werner before.
Post by Ivo Friedberg
In order to achieve this, we started implementing a cascading
attribute to the generated java classes in Castor and implemented the
cascading=”create” option. This should make it able that only new
added objects are stored automatically but no updates or delete
operations. In order to reach this goal (I think we are nearly there
right now although it’s some kind of bungling solution right now cause
the attribute is only a String value right now which is going to be
checked ;))
1. dependent objects: we came upon the question how to treat
dependent objects. As far as we found out, changing the master object
of an depending object ignores the value of autostore and always
creates the new master object. that seams reasonable, cause by the
means of dependent objects they have to have a master object. But now
we questioned whether we should take dependent relations into account
while defining the cascading attribute, for example always assume
cascading create and cascading delete as true but not update. This
would be possible and there is the question whether this is
interesting for castor or undermining the idea of the dependent objects!
As far as I know about depend every call to Datebase methods load(),
create(), update() or delete() are forbidden for dependent entities and
throw exceptions. For me this seams about similar to what should happen
when one declares a relation cascade=all. The difference between using
depend and cascade=all is, that depend also prevents access to dependent
entities at methods of Database interface. Does that make some sense?
Post by Ivo Friedberg
2. We where about to create some testcases but the question
occurred where to put them and how to set up the derby database right.
Is it better to make an own prpject for testing our implementation and
not putting the tests directly into the castor project?
@Werner: Do you have any specific wishes how we should treat this?
The testcases should go into cpactf. Its framework will create/drop
tables for you if you supply the scripts and will also initialize
JDOManager. As I have not yet added much javadoc to the framework I
suggest to look at one of the other testcases. Numbering of test
packages relate to jira issue number. If you have questions regarding
the cpactf ask them away by mail or join me on Castor irc where I try to
be online as offen as possible.
Post by Ivo Friedberg
Thanks for reading and have a nice evening,
Ivo
Regards
Ralf
--
Syscon Ingenieurbüro für Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
72127 Kusterdingen
Germany
Tel. +49 7071 3690 52
Mobil: +49 173 9630135
Fax +49 7071 3690 98
Internet: www.syscon.eu
Sitz der Gesellschaft: D-72127 Kusterdingen
Registereintrag: Amtsgericht Stuttgart, HRB 382295
Geschäftsleitung: Jens Joachim, Ralf Joachim
--------------------------------------------------------------------- To
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Werner Guttmann
2009-12-10 08:53:52 UTC
Permalink
Hi,

I agree with ralf that all tests should eventually end up in the
functional test suite of castor JDO, but right now, plain JUnit tests is
equally fine (as long as they will be transferred into the test suite at
a later time).

Cheers
Werner
Post by Ralf Joachim
Hi Ivo, Hi Michael,
see my comments inline.
Post by Ivo Friedberg
Hello,
At first I want to introduce myself (Ivo Friedberg) and a colleague of
mine, Michael Schroeder. We are both studying Informatics on the
Technical University of Vienna and are now participating in a lecture
called Advanced Software Engineering. In the context of this lecture
we decided (after a little presentation of Werner) to work on Castor
this semester and so here we are.
Very much appreciated.
Post by Ivo Friedberg
The last month we were up to learn the basic understanding of the
technology and structure of Castor (some of you may have noticed some
strange jira issues?!) and now we have actually started with the
underlying task. This is now to exchange the global AutoStore option
with a finer grained cascading system. It should work directly in the
mapping file allowing to specify which operations (create, update,
delete,…) should be performed cascading and which not!
I have recognized these jira issues but had informed by Werner before.
Post by Ivo Friedberg
In order to achieve this, we started implementing a cascading
attribute to the generated java classes in Castor and implemented the
cascading=”create” option. This should make it able that only new
added objects are stored automatically but no updates or delete
operations. In order to reach this goal (I think we are nearly there
right now although it’s some kind of bungling solution right now cause
the attribute is only a String value right now which is going to be
checked ;))
1. dependent objects: we came upon the question how to treat
dependent objects. As far as we found out, changing the master object
of an depending object ignores the value of autostore and always
creates the new master object. that seams reasonable, cause by the
means of dependent objects they have to have a master object. But now
we questioned whether we should take dependent relations into account
while defining the cascading attribute, for example always assume
cascading create and cascading delete as true but not update. This
would be possible and there is the question whether this is
interesting for castor or undermining the idea of the dependent objects!
As far as I know about depend every call to Datebase methods load(),
create(), update() or delete() are forbidden for dependent entities and
throw exceptions. For me this seams about similar to what should happen
when one declares a relation cascade=all. The difference between using
depend and cascade=all is, that depend also prevents access to dependent
entities at methods of Database interface. Does that make some sense?
Post by Ivo Friedberg
2. We where about to create some testcases but the question
occurred where to put them and how to set up the derby database right.
Is it better to make an own prpject for testing our implementation and
not putting the tests directly into the castor project?
@Werner: Do you have any specific wishes how we should treat this?
The testcases should go into cpactf. Its framework will create/drop
tables for you if you supply the scripts and will also initialize
JDOManager. As I have not yet added much javadoc to the framework I
suggest to look at one of the other testcases. Numbering of test
packages relate to jira issue number. If you have questions regarding
the cpactf ask them away by mail or join me on Castor irc where I try to
be online as offen as possible.
Post by Ivo Friedberg
Thanks for reading and have a nice evening,
Ivo
Regards
Ralf
--
Syscon Ingenieurbüro für Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
72127 Kusterdingen
Germany
Tel. +49 7071 3690 52
Mobil: +49 173 9630135
Fax +49 7071 3690 98
Internet: www.syscon.eu
Sitz der Gesellschaft: D-72127 Kusterdingen
Registereintrag: Amtsgericht Stuttgart, HRB 382295
Geschäftsleitung: Jens Joachim, Ralf Joachim
--------------------------------------------------------------------- To
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Loading...