I’m happy enough to have it working right now ­ when its closer to daylight
I’ll try to drum up a reasoned response for you :)

I do think I might have hit on another problem ­ perhaps you can point out
what I’m missing.

In the case of a bidirectional 1:1 with inverse, A.setB() doesn’t initialize
B’s reference to A (it doesn’t seem to call b.setA() such that the other
direction isn’t initialized).

Perhaps there’s some nuance to the DSL that I’m missing?


On 11/16/09 1:06 AM, "Patrik Nordwall" <patrik.nordw...@gmail.com> wrote:

> 
> 
> If we look at your initial sample, unidirectional A references B.
> Why would you place the forreign key in table B? I think it is correct to
> place the forreign key in table A.
> 
> If we look at bidirectional one-to-one situation. One of the objects must be
> the owner, i.e. hold the forreign key. By default, sculptor use a
> alphanumeric algorithm to decide which one is owner, to make sure the owner
> is the same each time (each generation). If you like you can define the
> owning side by using inverse as you already have figured out.
> 
> If you still think something is wrong we would be happy to fix it.
> 
> /Patrik
> 
> 
> 
> 
> Jef Pfeiffer wrote:
>> >
>> > I think you¹re right ­ we¹re seeing it work correctly now when its
>> > specified
>> > this way:
>> >
>> > Entity A
>> > {
>> >     -...@b myB inverse <->  myA;
>> > }
>> >
>> > Entity B
>> > {
>> >     String X;
>> >     String Y;
>> >     -...@a myA <-> myB;
>> > }
>> >
>> > The FK column and constraint are correctly applied to B.
>> >
>> >
>> >
>> > On 11/15/09 11:56 PM, "greatfooty" <greatfo...@gmail.com> wrote:
>> >
>>> >>
>>> >>
>>> >> Yeah that error msg would suggest that 1-1 relationship is fine.
>>> >>
>>> >> I can't try it myself right now as hitting some other issues but I looked
>>> >> thru the DDDSample dsl and interestingly found this:
>>> >>
>>> >> Entity Cargo {
>>> >>             - @TrackingId trackingId key
>>> >>             - @Location origin required fetch="join"
>>> >>             - @Location destination required fetch="join"
>>> >>             - @Itinerary itinerary nullable fetch="join" cascade="all"
>>> >> inverse opposite cargo
>>> >>             - Set<@HandlingEvent> events cascade="none" opposite cargo
>>> >>
>>> >> which looks like it maybe it works if the 1-1 is bi-directional?
>>> >> --
>>> >> View this message in context:
>>> >> 
>>> 
http://old.nabble.com/DDL-generation-error-on-1.6--tp26347787s17564p26367229.h
>>> >> tml
>>> >> Sent from the Fornax-Platform mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >> 
>>> 
------------------------------------------------------------------------------
>>> >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>> >> 30-Day
>>> >> trial. Simplify your report design, integration and deployment - and
>>> >> focus on
>>> >> what you do best, core application coding. Discover what's new with
>>> >> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>> >> _______________________________________________
>>> >> Fornax-developer mailing list
>>> >> Fornax-developer@lists.sourceforge.net
>>> >> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>>> >>
>> >
>> >
>> > 
>> 
------------------------------------------------------------------------------
>> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> > 30-Day
>> > trial. Simplify your report design, integration and deployment - and focus
>> > on
>> > what you do best, core application coding. Discover what's new with
>> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> > _______________________________________________
>> > Fornax-developer mailing list
>> > Fornax-developer@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/fornax-developer
>> >
>> >
> 
> --
> View this message in context:
> http://old.nabble.com/DDL-generation-error-on-1.6--tp26347787s17564p26367495.h
> tml
> Sent from the Fornax-Platform mailing list archive at Nabble.com.
> 
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
> 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to