No i have 1 language which can only have 1 regionCode
say Danish is always a region 2, it cannot be a region 3 dvd



On Tue, 2003-10-07 at 16:01, Konstantin Priblouda wrote:
> --- David Nielsen <[EMAIL PROTECTED]> wrote:
> > Oh, sorry in using jboss.
> > i dont want to use jbos specific ql (jboss-ql)
> 
> Well, I decided to throw entity beans alltogether
> and go for hibernate istead, but I'll try to help you
> 
> So, you try to define  relation language (n) - (m)
> region code - does CMR support n-m relations? 
> 
> 
> 
> > On Tue, 2003-10-07 at 15:04, Konstantin Priblouda
> > wrote:
> > > --- David Nielsen <[EMAIL PROTECTED]> wrote:
> > > > Hi there...
> > > > 
> > > > I have 2 EJB's
> > > > 
> > > > 1. LanguageBean
> > > > 2. DVDRegionCodesBean
> > > > 
> > > > in LanguagesBean i have:
> > > > 
> > > > /**
> > > > * @ejb.interface-method
> > > > * @ejb.relation
> > > > * name="Languages-DVDRegionCodes"
> > > > * role-name="Languages-Has-one-DVDRegionCode"
> > > > * target-ejb="DVDRegionCodes"
> > > > *
> > > >
> > >
> >
> target-role-name="DVDRegionCodes-belongs-to-Languages"
> > > > * target-cascade-delete="no"
> > > > * @jboss.relation
> > > > * related-pk-field="regionCode"
> > > > * fk-column="DVDREGION"
> > > > * fk-contraint="true"
> > > > */
> > > > public abstract DVDRegionCodesLocal
> > getDVDRegion();
> > > > 
> > > > i then ty to make a finder that finds all
> > Languages
> > > > the have a specific
> > > > regioncode. eks: region 2
> > > > 
> > > > i then creates the folowing xdoclet @ejb:finder
> > > > comment:
> > > > 
> > > > * @ejb:finder
> > > > *      signature= "java.util.Collection
> > > > findByDVDRegion(java.lang.Integer dvdRegion)"
> > > > *      query ="SELECT OBJECT(l) FROM Languages
> > AS
> > > > l,IN(l.DVDRegion) AS r
> > > > WHERE r = ?1"
> > > > 
> > > > and whats wrong...
> > > 
>  I would try  :
> SELECT OBJECT(l) FROM Languages AS l where l.DVDRegion
> = ?1
> assuming your property name was DVDRegion.
> 
> 
> But did you cared that one language can be present in 
> several region codes? ( Spain / Portuguise / Chinese /
> English will certainly... )
> 
> 
> 
> regards,
> 
> =====
> ----[ Konstantin Pribluda ( ko5tik ) ]----------------
> Zu Verstrkung meines Teams suche ich ab Sofort einen
> Softwareentwickler[In] fr die Festanstellung. 
> Arbeitsort: Mainz 
> Skills:  Programieren, Kentnisse in OpenSource-Bereich
> ----[ http://www.pribluda.de ]------------------------
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to