Rickard:
I'm not saying anything about the work around.
But in the case of a larger team, where I might have to build on a 3rd NF
schema that is valid, but does not map well to my uses, then the Entity
Beans, being mapped 1=1 wont work (and we are talking from a design
standpoint here). Worse yet, if the schema has been taken to 4th NF, I'm
really going to be out of luck!
I may have missed something earlier in the conversation, but I don't think
this is any slight on you or jboss. I saw this as a thread on design, which
I thought was great to see, as the jboss community makes excellent
design/build and deployment discussions. Maybe a little off topic for this
list, sorry, but one of the better places to actually discuss it.
Thanks,
Thor HW
----- Original Message -----
From: "Rickard �berg" <[EMAIL PROTECTED]>
To: "EJBoss" <[EMAIL PROTECTED]>
Sent: Friday, May 12, 2000 1:44 AM
Subject: Re: O->R Stuff Re: Seems like a big POS
Hi!
Phan Anh Tran wrote:
> The lifecycle of a pair of Leg depends on the lifecycle of a
> Person. Ie. If a Person was deleted from the database, their Legs would
be
> deleted as well.
This code goes into ejbRemove of PersonEntity, and could easily be
generated automatically.
> If you created a Person, their Legs should be created at the
> same time. Having 2 EntityBeans, PersonEntity and LegEntity would mean at
> least double the number of potential network calls...not a good thing :-)
You would most likely hide away the Entity-ness of your beans anyway, so
a client would never access them remotely.
> If you have one PersonEntity then you do not have to worry about deleting
the
> Leg entities that belong to the deleted PersonEntity. Same for creates.
As above, this can be handled automatically.
> If an alien came along, the you could model the alien as Alien (plain)
with a
> Collection of Leg(plain too). When you retrieve the Alien, you get all
the
> legs in one swoop.
>
> And the much more important point is what if a newer and fancier component
> technology came along tomorrow? What are you going do with your EJB
references?
They are stored as primary keys, which are composed of primitives. No
problem to port to whatever.
> As a rule, I find it a terrible idea to mix business/problem/application
space
> objects with "access" technology such as EJBs. I consider "access
> transparency" an important goal in achieving maximum re-use of
> business/problem/application logic stuff.
Me too. You *can* have this with the solution we have now, it just
requires more work.
The longterm solution is of course to do proper O/R, but until that time
we have a working workaround IMHO.
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.ejboss.org
http://www.dreambean.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]