Darth wrote:
>
> The two cases below seem correct the way you mention.
> But I want to know about a 3rd case - uni direction Many to One.
> JPA (as well as the hibernate link you showed in section 2.2.5.2) has the
> @ManyToOne.
> Can we actually model a Many to One uni-directional relation?
> And if we can, how would I figure out the source's multiplicity to
> correctly put the annotation.
> I think it seems we cant really model the many to one in dsl.
> In UML one could though.
> But yeah, maybe use cases for such a relation are less.
>
Exactly, I don't think it is needed. Maybe an example is necessary to be
able to understand when it should be useful.
You might also be interested in this:
http://fornax-platform.org/cp/display/fornax/2.+Hello+World+Tutorial+%28CSC%29?focusedCommentId=2121#comment-2121
Darth wrote:
>
> There is another missing information about the "owner" side. This is also
> mentioned in the hibernate link below in section 2.2.5.1...If we have a
> bi-directional one to one association, then one end gets the @JoinColumn
> and the other end gets the mappedBy. The former has to be put on the owner
> side (or the side that holds the FK column), but there is no meta
> information coming from the sculptor dsl to signify who is the owner. Not
> to mention the DDL generated by the bi-directional one to one case is
> incorrect. It generates two FK columns on both the end entities and treats
> both like isolated uni-directional one to one. So the DDL generated for
> A<-->B is like A-->B and B-->A. There is a FK from A to B and a FK from B
> to A. Which I think is incorrect. There has to be only one FK in the owner
> side, and thats the side that gets the @JoinColumn while the other end
> gets the mappedBy which signifies that this is the same one to one
> relation and no a different isolated one. I noticed in the contraints
> check one to one bidirectional wasnt allowed. Was this the reason?
>
one-to-one is not supported, since we don't find it very useful.
A design philosophy of sculptor is to start small and evolve when needed and
don't try to support every general scenario.
You can always add a change request in jira if you need one-to-one and we
will consider it.
--
View this message in context:
http://www.nabble.com/How-to-figure-out-if-a-relation-%28reference%29-is-Bi-Directional--tp18099001s17564p18134350.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer